Skip to content
Snippets Groups Projects
Commit bd041c8d authored by Benjamin Graillot's avatar Benjamin Graillot Committed by Benjamin Graillot
Browse files

[home] Use new home script

parent 7a2394e1
No related branches found
No related tags found
No related merge requests found
......@@ -7,5 +7,6 @@
ldap_password: "{{ vault.ldap_home_password }}"
binddn: cn=home,ou=service-users,dc=crans,dc=org
rootdn: cn=Utilisateurs,dc=crans,dc=org
borg_key: "{{ vault.borgbackup_passwd }}"
roles:
- home
......@@ -4,6 +4,7 @@
update_cache: true
install_recommends: false
name:
- python3-jinja2
- python3-ldap
register: apt_result
retries: 3
......@@ -34,8 +35,8 @@
- name: Deploy home config
template:
src: home/config.py.j2
dest: /var/local/home/config.py
src: home/home.json.j2
dest: /var/local/home/home.json
mode: 0600
owner: root
group: root
......
{{ ansible_header | comment }}
* * * * * root /usr/bin/python3 /var/local/home/main.py
* * * * * root /usr/bin/python3 /var/local/home/home.py
{{ ansible_header | comment }}
ldap_server = '{{ home.ldap_server }}'
binddn = '{{ home.binddn }}'
password = '{{ home.ldap_password }}'
rootdn = '{{ home.rootdn }}'
home_dir = '/pool/home'
mail_dir = '/pool/mail'
home_quota = '/usr/sbin/zfs set userquota@{user}=30G pool/home'
mail_quota = '/usr/sbin/zfs set userquota@{user}=10G pool/mail'
{
"ldap_server": "{{ home.ldap_server }}"
"binddn": "{{ home.binddn }}"
"password": "{{ home.ldap_password }}"
"rootdn": "{{ home.rootdn }}"
"home_dir": "/pool/home"
"mail_dir": "/pool/mail"
"home_quota": "/usr/sbin/zfs set userquota@{user}=30G pool/home"
"mail_quota": "/usr/sbin/zfs set userquota@{user}=10G pool/mail"
"borg_key": "{{ home.borg_key }}"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment