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

Error running controls 6.1.10 and 6.1.11 due to missing attribute stdout_lines #249

Closed
yinggs opened this issue Oct 30, 2024 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@yinggs
Copy link
Contributor

yinggs commented Oct 30, 2024

Describe the Issue
Error message when running controls 6.1.10 and 6.1.11:

The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout_lines'

Certain mounts were skipped because they did not meet the required conditions (eg. contains bind), resulting in the absence of the stdout_lines attribute.

Expected Behavior
Controls should not error out when mounts do not meet the required conditions.

Actual Behavior
The playbook failed at this control with the error and stopped running the rest of the controls.

Control(s) Affected
6.1.10 and 6.1.11

Environment (please complete the following information):

  • Branch being used: 1.3.2
  • Ansible Version: 2.12.10
  • Host Python Version: 3.8.10
  • Ansible Server Python Version: 3.8.10

Possible Solution
Add a selectattr filter to select only items from the results object where the stdout_lines attribute is defined.

@yinggs yinggs added the bug Something isn't working label Oct 30, 2024
uk-bolly added a commit that referenced this issue Nov 4, 2024
Added selectattr filter to fix #249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant