ansible-roles/roles/ldap2pg/tasks/install.yml

29 lines
737 B
YAML

---
- name: Install packages
package: name={{ ldap2pg_packages }}
tags: pg
- 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
- 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
register: ldap2pg_units
tags: pg
- name: Reload systemd
systemd: daemon_reload=True
when: ldap2pg_units.results | selectattr('changed','equalto',True) | list | length > 0
tags: pg