Move hard-coded numbers to variables.
This commit is contained in:
parent
572dd5a3b0
commit
81337ac0db
8 changed files with 16 additions and 8 deletions
|
@ -18,7 +18,7 @@
|
||||||
insertafter: "# GSSAPIDelegateCredentials no"
|
insertafter: "# GSSAPIDelegateCredentials no"
|
||||||
|
|
||||||
|
|
||||||
- name: check if firewox is available
|
- name: check if firefox is available
|
||||||
stat: path=/etc/firefox-esr/firefox-esr.js
|
stat: path=/etc/firefox-esr/firefox-esr.js
|
||||||
register: firefox
|
register: firefox
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,5 @@ basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | rep
|
||||||
ldap_server: ldap
|
ldap_server: ldap
|
||||||
krb_server: kerberos
|
krb_server: kerberos
|
||||||
nfs_server: nfs
|
nfs_server: nfs
|
||||||
|
min_id_sssd: 5000
|
||||||
|
max_id_sssd: 20000
|
||||||
|
|
|
@ -19,5 +19,5 @@ krb5_server = {{ krb_server }}
|
||||||
krb5_realm = {{ ansible_domain | upper }}
|
krb5_realm = {{ ansible_domain | upper }}
|
||||||
cache_credentials = true
|
cache_credentials = true
|
||||||
|
|
||||||
min_id = 10000
|
min_id = {{ min_id_sssd }}
|
||||||
max_id = 20000
|
max_id = {{ max_id_sssd }}
|
||||||
|
|
|
@ -2,3 +2,6 @@ ldap_admin_pwd: "{{ lookup('password', '/tmp/ldap_admin.pwd length=24') }}"
|
||||||
ldap_admin_pwd_file: "/root/ldap-admin.pwd"
|
ldap_admin_pwd_file: "/root/ldap-admin.pwd"
|
||||||
basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
|
basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
|
||||||
lan_homes: /home/lan
|
lan_homes: /home/lan
|
||||||
|
min_id: 10000
|
||||||
|
max_id: 20000
|
||||||
|
ldapuser_gid: 8000
|
||||||
|
|
|
@ -57,8 +57,8 @@ elif [ $1 = adduser -a $# -lt 3 ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MINID=10000
|
MINID={{ min_id }}
|
||||||
MAXID=20000
|
MAXID={{ max_id }}
|
||||||
HOMES="{{ lan_homes }}"
|
HOMES="{{ lan_homes }}"
|
||||||
|
|
||||||
COMMAND="$1"
|
COMMAND="$1"
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
export_root: /srv/nfs4
|
export_root: /srv/nfs4
|
||||||
lan_homes: /home/lan
|
lan_homes: /home/lan
|
||||||
basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
|
basedn: "{{ 'dc=' + ( ansible_domain | replace('^.','') | replace('.$','') | replace('.',',dc=')) }}"
|
||||||
|
min_id: 10000
|
||||||
|
min_id_sssd: 5000
|
||||||
|
max_id_sssd: 20000
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
when: kadmin.stat.exists
|
when: kadmin.stat.exists
|
||||||
|
|
||||||
- name: copy home from /etc/skel for dummy user foo
|
- 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:
|
args:
|
||||||
creates: "{{ lan_homes }}/foo"
|
creates: "{{ lan_homes }}/foo"
|
||||||
when: foo_pwd is defined and foo_pwd | length > 0
|
when: foo_pwd is defined and foo_pwd | length > 0
|
||||||
|
|
|
@ -19,5 +19,5 @@ krb5_server = {{ ansible_hostname }}
|
||||||
krb5_realm = {{ ansible_domain | upper }}
|
krb5_realm = {{ ansible_domain | upper }}
|
||||||
cache_credentials = false
|
cache_credentials = false
|
||||||
|
|
||||||
min_id = 10000
|
min_id = {{ min_id_sssd }}
|
||||||
max_id = 20000
|
max_id = {{ max_id_sssd }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue