Make 'ldap', 'kerberos' and 'nfs' hostname aliases.
This commit is contained in:
parent
9d9da31649
commit
7f49b191ac
4 changed files with 25 additions and 1 deletions
|
@ -173,6 +173,15 @@
|
||||||
- ldap
|
- ldap
|
||||||
when: not krb5kdc.stat.exists
|
when: not krb5kdc.stat.exists
|
||||||
|
|
||||||
|
- name: "make 'kerberos' an alias hostname resolvable from the LAN"
|
||||||
|
replace:
|
||||||
|
path: /etc/hosts
|
||||||
|
regexp: "^({{ ipaddr_lan }}\\s.+)$"
|
||||||
|
replace: '\1 kerberos'
|
||||||
|
when: not krb5kdc.stat.exists
|
||||||
|
|
||||||
|
########################
|
||||||
|
|
||||||
- name: kerberize dummy user foo
|
- name: kerberize dummy user foo
|
||||||
command: kadmin.local -q 'add_principal -pw "{{ foo_pwd }}" -x dn="uid=foo,ou=people,{{ basedn }}" foo'
|
command: kadmin.local -q 'add_principal -pw "{{ foo_pwd }}" -x dn="uid=foo,ou=people,{{ basedn }}" foo'
|
||||||
register: kerberize_result
|
register: kerberize_result
|
||||||
|
|
|
@ -10,5 +10,6 @@
|
||||||
- name: restart rpc-gssd
|
- name: restart rpc-gssd
|
||||||
systemd:
|
systemd:
|
||||||
name: rpc-gssd
|
name: rpc-gssd
|
||||||
|
daemon_reload: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
notify: "restart rpc-gssd"
|
notify: "restart rpc-gssd"
|
||||||
|
|
|
@ -62,6 +62,13 @@
|
||||||
command: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/slapd.d/slapd-config.ldif
|
command: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/slapd.d/slapd-config.ldif
|
||||||
when: not slapd.stat.exists
|
when: not slapd.stat.exists
|
||||||
|
|
||||||
|
- name: "make 'ldap' an alias hostname resolvable from the LAN"
|
||||||
|
replace:
|
||||||
|
path: /etc/hosts
|
||||||
|
regexp: "^({{ ipaddr_lan }}\\s.+)$"
|
||||||
|
replace: '\1 ldap'
|
||||||
|
when: not slapd.stat.exists
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
## Use the admin password saved to file from now on (available also after installation):
|
## Use the admin password saved to file from now on (available also after installation):
|
||||||
- name: slurp admin password
|
- name: slurp admin password
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
- fail: msg="The machine's domain must not be empty."
|
- fail: msg="The machine's domain must not be empty."
|
||||||
when: ansible_domain | length == 0
|
when: ansible_domain | length == 0
|
||||||
|
|
||||||
- name: check if there are installing
|
- name: check if we are installing
|
||||||
stat: path=/etc/exports
|
stat: path=/etc/exports
|
||||||
register: exports
|
register: exports
|
||||||
|
|
||||||
|
@ -29,6 +29,13 @@
|
||||||
{{ export_root }}/home/ *(sec=krb5p,rw,no_subtree_check)
|
{{ export_root }}/home/ *(sec=krb5p,rw,no_subtree_check)
|
||||||
notify: "restart nfs-kernel-server"
|
notify: "restart nfs-kernel-server"
|
||||||
|
|
||||||
|
- name: "make 'nfs' an alias hostname resolvable from the LAN"
|
||||||
|
replace:
|
||||||
|
path: /etc/hosts
|
||||||
|
regexp: "^({{ ipaddr_lan }}\\s.+)$"
|
||||||
|
replace: '\1 nfs'
|
||||||
|
when: not exports.stat.exists
|
||||||
|
|
||||||
- name: check if there is a local kadmin
|
- name: check if there is a local kadmin
|
||||||
stat: path=/usr/sbin/kadmin.local
|
stat: path=/usr/sbin/kadmin.local
|
||||||
register: kadmin
|
register: kadmin
|
||||||
|
|
Loading…
Add table
Reference in a new issue