Add 'ldap' alias in ldap role.
This commit is contained in:
parent
429ca35a75
commit
bfee555f1e
3 changed files with 15 additions and 11 deletions
|
@ -211,11 +211,11 @@
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart slapd
|
notify: restart slapd
|
||||||
|
|
||||||
- name: "make 'kerberos' and 'ldap' alias hostnames resolvable from the LAN"
|
- name: "make 'kerberos' an alias hostname"
|
||||||
replace:
|
replace:
|
||||||
path: /etc/hosts
|
path: /etc/hosts
|
||||||
regexp: "^({{ ipaddr_lan | ipaddr('address') }}\\s.+)$"
|
regexp: "^({{ ipaddr_lan | ipaddr('address') }}\\s.+)$"
|
||||||
replace: '\1 kerberos ldap'
|
replace: '\1 kerberos'
|
||||||
when: not krb5kdc.stat.exists
|
when: not krb5kdc.stat.exists
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|
|
@ -53,6 +53,13 @@
|
||||||
dest: /usr/local/sbin/debian-lan
|
dest: /usr/local/sbin/debian-lan
|
||||||
mode: 0744
|
mode: 0744
|
||||||
|
|
||||||
|
- name: allow ldap service in firewalld
|
||||||
|
firewalld:
|
||||||
|
zone: internal
|
||||||
|
service: ldap
|
||||||
|
permanent: true
|
||||||
|
immediate: true
|
||||||
|
state: enabled
|
||||||
|
|
||||||
- name: add dummy user foo
|
- name: add dummy user foo
|
||||||
ldap_entry:
|
ldap_entry:
|
||||||
|
@ -82,12 +89,3 @@
|
||||||
bind_dn: "cn=admin,{{ basedn }}"
|
bind_dn: "cn=admin,{{ basedn }}"
|
||||||
bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
|
bind_pw: "{{ ldap_admin_pwd['content'] | b64decode | replace('\n', '') }}"
|
||||||
when: foo_pwd is defined and foo_pwd | length > 0
|
when: foo_pwd is defined and foo_pwd | length > 0
|
||||||
|
|
||||||
|
|
||||||
- name: allow ldap service in firewalld
|
|
||||||
firewalld:
|
|
||||||
zone: internal
|
|
||||||
service: ldap
|
|
||||||
permanent: true
|
|
||||||
immediate: true
|
|
||||||
state: enabled
|
|
||||||
|
|
|
@ -87,6 +87,12 @@
|
||||||
regexp: "^(TLS_CACERT\\s+/etc/ssl/certs/ca-certificates.crt)$"
|
regexp: "^(TLS_CACERT\\s+/etc/ssl/certs/ca-certificates.crt)$"
|
||||||
replace: '#\1\nTLS_CACERT\t{{ certpub }}'
|
replace: '#\1\nTLS_CACERT\t{{ certpub }}'
|
||||||
|
|
||||||
|
- name: "make 'ldap' an alias hostname"
|
||||||
|
replace:
|
||||||
|
path: /etc/hosts
|
||||||
|
regexp: "^({{ ipaddr_lan | ipaddr('address') }}\\s.+)$"
|
||||||
|
replace: '\1 ldap'
|
||||||
|
|
||||||
- name: enable pam-mkhomedir
|
- name: enable pam-mkhomedir
|
||||||
command: pam-auth-update --enable mkhomedir
|
command: pam-auth-update --enable mkhomedir
|
||||||
when: foo_pwd is defined and foo_pwd | length > 0
|
when: foo_pwd is defined and foo_pwd | length > 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue