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,10 +1,27 @@
---
# Load distribution specific variables
- include_vars: "{{ item }}"
with_first_found:
- "{{ role_path }}/vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
- name: Set default install mode
set_fact: ldap2pg_install_mode='none'
tags: pg
- name: Check if ldap2pg is installed
stat: path=/usr/local/bin/ldap2pg
register: ldap2pg_bin
tags: pg
- name: Check installed version
shell: ldap2pg -V | head -1 | sed -E 's/ldap2pg v(\d+)/\1/'
register: ldap2pg_current_version
when: ldap2pg_bin.stat.exists
changed_when: False
tags: pg
- name: Set install mode
set_fact: ldap2pg_install_mode='install'
when: not ldap2pg_bin.stat.exists
tags: pg
- name: Set install_mode to upgrade
set_fact: ldap2pg_install_mode='upgrade'
when: ldap2pg_bin.stat.exists and ldap2pg_current_version.stdout != ldap2pg_version
tags: pg