initial version of ldap client

This commit is contained in:
Timo Makinen 2019-05-27 21:10:50 +03:00
parent 81a3becc55
commit a69e66bbac
3 changed files with 29 additions and 0 deletions

View 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 }}"

View file

@ -0,0 +1,5 @@
BASE dc=foo,dc=sh
URI ldaps://ldap01.home.foo.sh
TLS_CACERT {{ tls_certs }}/ca.crt

View file

@ -0,0 +1,2 @@
TLS_KEY {{ tls_private }}/{{ inventory_hostname }}.key
TLS_CERT {{ tls_certs }}/{{ inventory_hostname }}.crt