Skip to content

Commit

Permalink
Merge pull request #44 from mwilck/suse-support
Browse files Browse the repository at this point in the history
Support for openSUSE and SUSE Linux enterprise
  • Loading branch information
lvps authored Feb 29, 2024
2 parents ee51dc9 + b7c6b21 commit 7cdeef4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ galaxy_info:
galaxy_tags:
- ldap
dependencies: []
collections:
- community.general
11 changes: 9 additions & 2 deletions tasks/install_389ds.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
---
- import_tasks: tasks/install_389ds_suse.yml
when: "ansible_facts['os_family'] == 'Suse'"

- import_tasks: tasks/install_389ds_EL7.yml
when: "ansible_facts['distribution_major_version'] | int == 7"
when: >-
ansible_facts['os_family'] == 'RedHat' and
ansible_facts['distribution_major_version'] | int == 7
- import_tasks: tasks/install_389ds_EL8.yml
when: "ansible_facts['distribution_major_version'] | int >= 8"
when: >-
ansible_facts['os_family'] == 'RedHat' and
ansible_facts['distribution_major_version'] | int >= 8
- name: Determine installed server type (1.3.X or 1.4.X)
set_fact:
Expand Down
16 changes: 16 additions & 0 deletions tasks/install_389ds_suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- name: Install 389DS with zypper
zypper:
name: "{{ dirsrv_product }}"
state: latest
update_cache: no

- name: Check 389DS package version with rpm
command:
cmd: "rpm -q --qf '%{version}' {{ dirsrv_product }}"
register: dirsrv_package_details
check_mode: false

- name: Check 389DS package version
set_fact:
dirsrv_package_version: "{{ dirsrv_package_details.stdout }}"

0 comments on commit 7cdeef4

Please sign in to comment.