if check mode, verify packages are installed before continuing
If packages are not installed, commands will fail in check mode.
This commit is contained in:
committed by
Richard Megginson
parent
8ef1897517
commit
96cda3f1d4
@@ -10,7 +10,12 @@
|
|||||||
state: present
|
state: present
|
||||||
use: "{{ (__aide_is_ostree | d(false)) |
|
use: "{{ (__aide_is_ostree | d(false)) |
|
||||||
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
|
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
|
||||||
|
register: __aide_install_packages
|
||||||
|
|
||||||
|
- name: Packages are installed
|
||||||
|
# either run mode or check mode and no changes to packages
|
||||||
|
when: not ansible_check_mode or (ansible_check_mode and not __aide_install_packages.changed)
|
||||||
|
block:
|
||||||
- name: Get AIDE version
|
- name: Get AIDE version
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: aide --version
|
cmd: aide --version
|
||||||
|
|||||||
Reference in New Issue
Block a user