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-07-020110 does not reference rhel_07_020110_autofs_service_status.stdout #431

Closed
whitehat237 opened this issue Aug 7, 2023 · 1 comment
Labels

Comments

@whitehat237
Copy link
Contributor

Describe the Issue
The conditional check for the RHEL-07-020110 task for ansible.builtin.service (line number 1353 in tasks/fix-cat2.yml) does not reference the registered variable rhel_07_020110_autofs_service_status.stdout. The variable is referenced directly, and thus will not equal the string "loaded"

Expected Behavior
rhel_07_020110_autofs_service_status.stdout is referenced by the task, and the string "loaded" is properly matched or not.

Actual Behavior
rhel_07_020110_autofs_service_status is referenced without checking .stdout sub item in the returned dictionary, and thus the string comparison for "loaded" will never match.

Control(s) Affected
RHEL-07-020110

Environment (please complete the following information):

  • Ansible Version: >= 2.9
  • Host Python Version: >= 2.7 or 3.8
  • Ansible Server Python Version: 3.8
  • Additional Details:

Additional Notes

Possible Solution
Ammend line 1353 as follows:
remove: rhel_07_020110_autofs_service_status == "loaded"
add: rhel_07_020110_autofs_service_status.stdout == "loaded"

I will also submit a pull request to amend as described above.

@whitehat237 whitehat237 added the bug label Aug 7, 2023
@whitehat237
Copy link
Contributor Author

PR 430 opened, includes commit to resolve this issue.

uk-bolly added a commit that referenced this issue Aug 8, 2023
Signed-off-by: Mark Bolwell <[email protected]>
uk-bolly added a commit that referenced this issue Aug 8, 2023
Signed-off-by: Mark Bolwell <[email protected]>
@uk-bolly uk-bolly mentioned this issue Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant