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

RHEL 9 ACSC ISM Official Profile - Ansible Remediation Role - set -o pipefail issue #10046

Closed
rodlilearns opened this issue Jan 11, 2023 · 1 comment · Fixed by #10951
Closed
Assignees
Labels
enhancement General enhancements to the project.
Milestone

Comments

@rodlilearns
Copy link

Share the context

The Ansible Remediation Role for RHEL 9 ACSC ISM Official Profile has a failure point.

Description of problem:

The task Get all world-writable directories with no sticky bits set fails.

Proposed change:

The tasks uses set -o pipefail issue which bypasses a non-zero return code if a shell exits with a non-zero return code.

However, we don't want this to fail the task.

I added a ignore_errors: true at the end of the task, to keep the playbook going.

References:

1.https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425#set--e--u--x--o-pipefail

@rodlilearns rodlilearns added the enhancement General enhancements to the project. label Jan 11, 2023
@marcusburghardt marcusburghardt self-assigned this Aug 3, 2023
@marcusburghardt
Copy link
Member

We can use the macro introduced by #10912
I am working on a PR to update the dir_perms_world_writable_sticky_bits rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancements to the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants