Move hard-coded numbers to variables.

This commit is contained in:
Andreas B. Mundt 2019-12-13 18:43:42 +01:00
parent 572dd5a3b0
commit 81337ac0db
8 changed files with 16 additions and 8 deletions

View file

@ -1,3 +1,6 @@
export_root: /srv/nfs4
lan_homes: /home/lan
basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
min_id: 10000
min_id_sssd: 5000
max_id_sssd: 20000

View file

@ -67,7 +67,7 @@
when: kadmin.stat.exists
- name: copy home from /etc/skel for dummy user foo
shell: cp -r /etc/skel {{ lan_homes }}/foo && chmod -R o-rwx {{ lan_homes }}/foo && chown -R 10000:10000 {{ lan_homes }}/foo
shell: cp -r /etc/skel {{ lan_homes }}/foo && chmod -R o-rwx {{ lan_homes }}/foo && chown -R {{ min_id }}:{{ min_id }} {{ lan_homes }}/foo
args:
creates: "{{ lan_homes }}/foo"
when: foo_pwd is defined and foo_pwd | length > 0

View file

@ -19,5 +19,5 @@ krb5_server = {{ ansible_hostname }}
krb5_realm = {{ ansible_domain | upper }}
cache_credentials = false
min_id = 10000
max_id = 20000
min_id = {{ min_id_sssd }}
max_id = {{ max_id_sssd }}