mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-30 11:15:42 +02:00
Update to 2023-10-13 15:00
This commit is contained in:
@@ -1,20 +1,28 @@
|
||||
---
|
||||
|
||||
- name: Install packages
|
||||
package: name={{ ldap2pg_packages }}
|
||||
- name: Ensure ldap2pg package is removed
|
||||
package: name=ldap2pg state=absent
|
||||
tags: pg
|
||||
|
||||
- when: ansible_os_family == 'RedHat' and ansible_distribution_major_version is version('8', '<')
|
||||
- when: ldap2pg_install_mode != 'none'
|
||||
block:
|
||||
- name: Check if ldap2Pg is built with python 2 or 3
|
||||
stat: path=/usr/lib/python3.6/site-packages/ldap2pg/ldap.py
|
||||
register: ldap2pg_py
|
||||
- name: Download ldap2pg binary
|
||||
get_url:
|
||||
url: "{{ ldap2pg_archive_url }}"
|
||||
dest: /tmp/ldap2pg.tar.gz
|
||||
checksum: "sha256:{{ ldap2pg_archive_sha256 }}"
|
||||
|
||||
- name: Set ldap.py path
|
||||
set_fact: ldap_py_ver={{ ldap2pg_py.stat.exists | ternary('3.6', '2.7') }}
|
||||
- name: Extract ldap2pg archive
|
||||
unarchive:
|
||||
src: /tmp/ldap2pg.tar.gz
|
||||
dest: /usr/local/bin
|
||||
include:
|
||||
- ldap2pg
|
||||
owner: root
|
||||
group: root
|
||||
mode: 755
|
||||
remote_src: True
|
||||
|
||||
- name: Patch ldap2pg to specify global cacert
|
||||
patch: src=ldap2pg_cacert.diff dest=/usr/lib/python{{ ldap_py_ver }}/site-packages/ldap2pg/ldap.py
|
||||
tags: pg
|
||||
|
||||
- name: Install systemd unit
|
||||
|
Reference in New Issue
Block a user