tasks: Add missing tags for async tasks

When running the role using a specific tag (eg -t auth), some tasks
try to check the status of the async ones and they fail because the
async task was never executed due to missing the 'always' tag. We can
fix that by adding the missing tags to the async tasks.

For example,

TASK [ansible-hardening : Remove .shosts or shosts.equiv files]
******************************************************************************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "'job_result' is undefined"}

So we add the appropriate tags to the async tasks.

Change-Id: I24a23fb485f2269ae6f627533b3a725f6699d230
This commit is contained in:
Markos Chandras 2017-12-13 12:48:46 +00:00
parent 46a94c7251
commit d6ead42b8f
4 changed files with 21 additions and 0 deletions

View File

@ -28,6 +28,9 @@
- not check_mode | bool
- ansible_os_family | lower in ['redhat', 'suse']
tags:
- rpm
- high
- V-71855
- skip_ansible_lint
- name: Check for .shosts or shosts.equiv files
@ -43,3 +46,8 @@
when:
- not check_mode | bool
- security_rhel7_remove_shosts_files | bool
tags:
- high
- auth
- V-72277
- V-72279

View File

@ -236,6 +236,11 @@
retries: 30
when:
- not shosts_find | skipped
tags:
- high
- auth
- V-72277
- V-72279
- name: Remove .shosts or shosts.equiv files
file:

View File

@ -23,6 +23,10 @@
retries: 30
when:
- not rpmverify_task | skipped
tags:
- rpm
- high
- V-71855
- name: V-71855 - Get files with invalid checksums (rpm)
shell: "grep '^..5' {{ temp_dir }}/rpmverify.txt | awk '{ print $NF }'"

View File

@ -24,6 +24,10 @@
retries: 30
when:
- not rpmverify_task | skipped
tags:
- rpm
- high
- V-71855
- name: V-71855 - Get files with invalid checksums (rpm)
shell: "grep '^..5' {{ temp_dir }}/rpmverify.txt | awk '{ print $NF }'"