aboutsummaryrefslogtreecommitdiffstats
path: root/roles/ldapd/tasks
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-07-29 17:00:20 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-07-29 17:00:20 +0200
commitb232b894c3cbe087c8d504e91637dcf62199eed1 (patch)
treeea72a7d1a7f63c6425ee46785e1cec924351b2c3 /roles/ldapd/tasks
parent22126073344e60c405d086df37b64da0c6d3c086 (diff)
downloadinfrastructure-b232b894c3cbe087c8d504e91637dcf62199eed1.tar.gz
Bump to third revision of homelab
Diffstat (limited to 'roles/ldapd/tasks')
-rw-r--r--roles/ldapd/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/ldapd/tasks/main.yml b/roles/ldapd/tasks/main.yml
new file mode 100644
index 0000000..2866ba8
--- /dev/null
+++ b/roles/ldapd/tasks/main.yml
@@ -0,0 +1,22 @@
+- name: ensure ldapd db dir exists
+ file:
+ path: "{{ ldapd_dir }}"
+ owner: "{{ ldapd_user }}"
+ group: "{{ ldapd_group }}"
+ state: directory
+ mode: "0700"
+
+- name: generate ldapd configuration
+ template:
+ src: etc-ldapd.conf.j2
+ dest: /etc/ldapd.conf
+ owner: "0"
+ group: "0"
+ mode: "0600"
+
+- name: enable and start ldapd
+ service:
+ name: ldapd
+ state: restarted
+ enabled: true
+ args: -r "{{ ldapd_dir }}"
remember that computers suck.