[re2o-replica-ldap] Move files to /var/lib/slapd
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>certbot_on_virtu
parent
741a13b402
commit
3e4aac76d6
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
- name: Check if installation was done
|
- name: Check if installation was done
|
||||||
stat:
|
stat:
|
||||||
path: /root/.delete_me_to_reset_ldap_configuration
|
path: /var/lib/slapd/.delete_me_to_reset_ldap_configuration
|
||||||
register: installation
|
register: installation
|
||||||
|
|
||||||
- name: Stop slapd
|
- name: Stop slapd
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
- name: Copy ldif files
|
- name: Copy ldif files
|
||||||
template:
|
template:
|
||||||
src: 'ldap/{{ item }}.ldif.j2'
|
src: 'ldap/{{ item }}.ldif.j2'
|
||||||
dest: '/tmp/{{ item }}.ldif'
|
dest: '/var/lib/slapd/{{ item }}.ldif'
|
||||||
owner: openldap
|
owner: openldap
|
||||||
group: openldap
|
group: openldap
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
@ -57,12 +57,12 @@
|
||||||
|
|
||||||
- name: Initialize re2o-ldap schema
|
- name: Initialize re2o-ldap schema
|
||||||
when: not installation.stat.exists
|
when: not installation.stat.exists
|
||||||
shell: slapadd -n 0 -l /tmp/schema.ldif -F /etc/ldap/slapd.d/
|
shell: slapadd -n 0 -l /var/lib/slapd/schema.ldif -F /etc/ldap/slapd.d/
|
||||||
become_user: openldap
|
become_user: openldap
|
||||||
|
|
||||||
- name: Initialize re2o-ldap database
|
- name: Initialize re2o-ldap database
|
||||||
when: not installation.stat.exists
|
when: not installation.stat.exists
|
||||||
shell: slapadd -n 1 -l /tmp/db.ldif
|
shell: slapadd -n 1 -l /var/lib/slapd/db.ldif
|
||||||
become_user: openldap
|
become_user: openldap
|
||||||
|
|
||||||
- name: Start slapd
|
- name: Start slapd
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
- name: Enable data replication
|
- name: Enable data replication
|
||||||
when: not installation.stat.exists
|
when: not installation.stat.exists
|
||||||
shell: ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /tmp/consumer_simple_sync.ldif
|
shell: ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /var/lib/slapd/consumer_simple_sync.ldif
|
||||||
|
|
||||||
- name: Copy TLS certificate
|
- name: Copy TLS certificate
|
||||||
template:
|
template:
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
- name: Load TLS certificates
|
- name: Load TLS certificates
|
||||||
when: not installation.stat.exists
|
when: not installation.stat.exists
|
||||||
shell: ldapmodify -Y EXTERNAL -H ldapi:/// -f /tmp/certinfo.ldif
|
shell: ldapmodify -Y EXTERNAL -H ldapi:/// -f /var/lib/slapd/certinfo.ldif
|
||||||
|
|
||||||
- name: Enable LDAPS
|
- name: Enable LDAPS
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
- name: Touch installation marker
|
- name: Touch installation marker
|
||||||
when: not installation.stat.exists
|
when: not installation.stat.exists
|
||||||
file:
|
file:
|
||||||
path: /root/.delete_me_to_reset_ldap_configuration
|
path: /var/lib/slapd/.delete_me_to_reset_ldap_configuration
|
||||||
state: touch
|
state: touch
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
Loading…
Reference in New Issue