initial version of ldap client
This commit is contained in:
parent
81a3becc55
commit
a69e66bbac
3 changed files with 29 additions and 0 deletions
22
roles/ldap/client/tasks/main.yml
Normal file
22
roles/ldap/client/tasks/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
|
||||
- name: install packages
|
||||
package:
|
||||
name: openldap-clients
|
||||
state: installed
|
||||
|
||||
- name: configure ldap client
|
||||
template:
|
||||
dest: /etc/openldap/ldap.conf
|
||||
src: ldap.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: authenticate to ldap with host certs when running as root
|
||||
template:
|
||||
dest: /root/.ldaprc
|
||||
src: ldaprc.j2
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
5
roles/ldap/client/templates/ldap.conf.j2
Normal file
5
roles/ldap/client/templates/ldap.conf.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
BASE dc=foo,dc=sh
|
||||
URI ldaps://ldap01.home.foo.sh
|
||||
|
||||
TLS_CACERT {{ tls_certs }}/ca.crt
|
2
roles/ldap/client/templates/ldaprc.j2
Normal file
2
roles/ldap/client/templates/ldaprc.j2
Normal file
|
@ -0,0 +1,2 @@
|
|||
TLS_KEY {{ tls_private }}/{{ inventory_hostname }}.key
|
||||
TLS_CERT {{ tls_certs }}/{{ inventory_hostname }}.crt
|
Loading…
Add table
Add a link
Reference in a new issue