[home] Use new home script

certbot_on_virtu
_benjamin 2021-04-29 14:38:56 +02:00 committed by Benjamin Graillot
parent 7a2394e1e0
commit bd041c8dc7
5 changed files with 16 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -1,2 +1,2 @@
{{ ansible_header | comment }}
* * * * * root /usr/bin/python3 /var/local/home/main.py
* * * * * root /usr/bin/python3 /var/local/home/home.py

View File

@ -1,10 +0,0 @@
{{ 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'

View File

@ -0,0 +1,11 @@
{
"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 }}"
}