2022-03-17 09:00:06 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Install packages
|
|
|
|
package: name={{ ldap2pg_packages }}
|
|
|
|
tags: pg
|
|
|
|
|
2022-03-17 19:00:06 +01:00
|
|
|
- name: Patch ldap2pg to specify global cacert
|
|
|
|
patch: src=ldap2pg_cacert.diff dest=/usr/lib/python2.7/site-packages/ldap2pg/ldap.py
|
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
|
|
|
- ansible_distribution_major_version is version('8', '<')
|
|
|
|
tags: pg
|
|
|
|
|
2022-03-17 09:00:06 +01:00
|
|
|
- name: Install systemd unit
|
|
|
|
template: src=ldap2pg.{{ item }}.j2 dest=/etc/systemd/system/ldap2pg.{{ item }}
|
|
|
|
loop:
|
|
|
|
- service
|
|
|
|
- timer
|
|
|
|
notify:
|
|
|
|
- restart ldap2pg.service
|
|
|
|
- restart ldap2pg.timer
|
2022-03-17 10:00:06 +01:00
|
|
|
register: ldap2pg_units
|
|
|
|
tags: pg
|
|
|
|
|
|
|
|
- name: Reload systemd
|
|
|
|
systemd: daemon_reload=True
|
2022-03-17 19:00:06 +01:00
|
|
|
when: ldap2pg_units.results | selectattr('changed','equalto',True) | list | length > 0
|
2022-03-17 09:00:06 +01:00
|
|
|
tags: pg
|