Skip to content

Commit 90a7536

Browse files
committed
oraswdb_install: ansible-lint & refactoring
1 parent a6ceae0 commit 90a7536

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

roles/oraswdb_install/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ _hostinitdaemon_dict:
7575
version_highest: 11
7676

7777
# {{ ansible_facts['distribution_version'] is version('12.04', '>=') }}
78-
hostinitdaemon: "{% if ansible_distribution_major_version is version(_hostinitdaemon_dict[ansible_os_family], <=) %}init{% else %}systemd{% endif %}"
78+
hostinitdaemon: "{% if ansible_distribution_major_version is version(_hostinitdaemon_dict[ansible_os_family]['version_highest'], '<=') %}init{% else %}systemd{% endif %}"
7979

8080
forcechopt: false
8181
# choptcheck is a dummy for 'creates' during chopt-task to force an execution

roles/oraswdb_install/tasks/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
- always
1919
- assert
2020

21+
- name: install_home_db | assert hostinitdaemon
22+
ansible.builtin.assert:
23+
fail_msg: the init-Daemon could not be defined from defaults/main.yml
24+
that:
25+
- _hostinitdaemon_dict[ansible_os_family]['version_highest'] is defined
26+
tags:
27+
- always
28+
- assert
29+
2130
- name: install_home_db | Mount nfs share with installation media
2231
ansible.builtin.include_role:
2332
name: orasw_meta

0 commit comments

Comments
 (0)