Closed kielboy8 closed 2 years ago
Describe the bug 1.1.10 reporting ok even if shell command reports no output in tasks/section1.yml line 317
To Reproduce Steps to reproduce the behavior:
(I'm running this in localhost)
sudo ansible-playbook site.yml --tags="rule_1.1.10"
Expected behavior
TASK [ubuntu2004_cis : SCORED | 1.1.10 | PATCH | Ensure separate partition exists for /var] would fail if there is no "on /var " that exists in mount
TASK [ubuntu2004_cis : SCORED | 1.1.10 | PATCH | Ensure separate partition exists for /var]
"on /var "
But it didn't fail.
Software (please complete the following information):
Additional context The same goes for rule_1.1.11
Fix:
Replace changed_when: false and failed_when: false to changed_when: not var_mounted.stdout and failed_when: not var_mounted.stdout respectively
changed_when: false
failed_when: false
changed_when: not var_mounted.stdout
failed_when: not var_mounted.stdout
Describe the bug 1.1.10 reporting ok even if shell command reports no output in tasks/section1.yml line 317
To Reproduce Steps to reproduce the behavior:
(I'm running this in localhost)
sudo ansible-playbook site.yml --tags="rule_1.1.10"
Expected behavior
TASK [ubuntu2004_cis : SCORED | 1.1.10 | PATCH | Ensure separate partition exists for /var]
would fail if there is no"on /var "
that exists in mountBut it didn't fail.
Software (please complete the following information):
Additional context The same goes for rule_1.1.11