Update to 2023-10-13 15:00

This commit is contained in:
Daniel Berteaud
2023-10-13 15:00:23 +02:00
parent 5956dad4fd
commit e823a08de2
32 changed files with 163 additions and 142 deletions

View File

@@ -1,5 +1,9 @@
---
- name: Deploy env file
template: src=ldap2pg.env.j2 dest=/etc/sysconfig/ldap2pg owner=root group=postgres mode=640
tags: pg
- name: Deploy ldap2pg configuration
block:
- name: Render config template
@@ -15,10 +19,11 @@
- restart ldap2pg.timer
- name: Validate new configuration
command: /bin/ldap2pg --config /etc/ldap2pg.yml --dry
command: /usr/local/bin/ldap2pg --config /etc/ldap2pg.yml
changed_when: False
become_user: "{{ ldap2pg_user }}"
register: ldap2pg_conf_validation
environment: "{{ ldap2pg_env }}"
rescue:
- name: Rollback previous configuration
@@ -35,6 +40,7 @@
- name: Fails if new configuration isn't validated
fail:
msg: "Failed to validate /etc/ldap2pg: {{ ldap2pg_conf_validation.stdout }}"
msg: "Failed to validate /etc/ldap2pg.yml: {{ ldap2pg_conf_validation.stdout }}"
when: ldap2pg_conf_validation.rc != 0
tags: pg