Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use include_tasks for os_hardening/main.yml #451

Merged
merged 1 commit into from Jun 23, 2021
Merged

Use include_tasks for os_hardening/main.yml #451

merged 1 commit into from Jun 23, 2021

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Jun 22, 2021

When import_tasks is used, the task Fetch OS dependent variables
always runs, even when excluded by an upstream tag.

When Fetch OS dependent variables runs while excluded via tags, it
will always fail with the following.

fatal: [alpha]: FAILED! => {"msg": "No file was found when using first_found. Use errors='ignore' to allow this task to be skipped if no files are found"}

This brings os_hardening's main.yml in line with ssh_hardening's
main.yml, which doesn't have this issue.

When `import_tasks` is used, the task `Fetch OS dependent variables`
always runs, even when excluded by an upstream tag.

When `Fetch OS dependent variables` runs while excluded via tags, it
will always fail with the following.

```
fatal: [alpha]: FAILED! => {"msg": "No file was found when using first_found. Use errors='ignore' to allow this task to be skipped if no files are found"}
```

This brings os_hardening's main.yml in line with ssh_hardening's
main.yml, which doesn't have this issue.

Signed-off-by: Colin Adler <colin@coder.com>
@rndmh3ro rndmh3ro added the bug label Jun 23, 2021
@rndmh3ro rndmh3ro merged commit 8cbeeff into dev-sec:master Jun 23, 2021
@rndmh3ro
Copy link
Member

Thanks!

divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
When `import_tasks` is used, the task `Fetch OS dependent variables`
always runs, even when excluded by an upstream tag.

When `Fetch OS dependent variables` runs while excluded via tags, it
will always fail with the following.

```
fatal: [alpha]: FAILED! => {"msg": "No file was found when using first_found. Use errors='ignore' to allow this task to be skipped if no files are found"}
```

This brings os_hardening's main.yml in line with ssh_hardening's
main.yml, which doesn't have this issue.

Signed-off-by: Colin Adler <colin@coder.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants