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

manage skipped result #87

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

jouve
Copy link
Contributor

@jouve jouve commented Aug 26, 2024

Overall Review of Changes:
A general description of the changes made that are being requested for merge

6.1.11 execute shell module looping on mounts then filtered using when.

if the item is filtered then the result do not contains the usual fields from shell instead it looks like

(item={'changed': False, 'skipped': True, 'skip_reason': 'Conditional result was False', 'false_condition': "item['device'].startswith('/dev')", 'item': {'mount': '/tmp', 'device': '/tmp', 'fstype': 'tmpfs', 'options': 'rw,seclabel,nosuid,nodev,noexec,relatime', 'dump': 0, 'passno': 0, 'size_total': 4095590400, 'size_available': 4095381504, 'block_size': 4096, 'block_total': 999900, 'block_available': 999849, 'block_used': 51, 'inode_total': 999900, 'inode_available': 999877, 'inode_used': 23, 'uuid': 'N/A'}, 'ansible_loop_var': 'item'})

and the next task will fail with :

    amazon-ebs.base_ami: fatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout_lines'\n\nThe error appears to be in '/Users/xxxx/.ansible/roles/MindPointGroup.amazon2023_cis/tasks/section_6/cis_6.1.x.yml': line 235, column 9, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n      - name: \"6.1.11 | AUDIT | Ensure no unowned or ungrouped files or directories exist | Displaying any unowned files or directories\"\n        ^ here\n"}

Issue Fixes:
Please list (using linking) any open issues this PR addresses

this was introduced in #83

Enhancements:
Please list any enhancements/features that are not open issue tickets

How has this been tested?:
Please give an overview of how these changes were tested. If they were not please use N/A

tested manually in a packer build

uk-bolly
uk-bolly previously approved these changes Sep 5, 2024
@uk-bolly
Copy link
Member

uk-bolly commented Sep 5, 2024

Nice PR thank you very much, unfortunately the commits are not GPG signed. If you are able to gpg-sign your commit, am happy to merge.

Thanks

uk-bolly

@uk-bolly uk-bolly dismissed their stale review September 5, 2024 11:09

Missing GPG signoff

Signed-off-by: Cyril Jouve <[email protected]>
Copy link
Member

@uk-bolly uk-bolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant and thanks for the update

@uk-bolly uk-bolly merged commit fae82e0 into ansible-lockdown:devel Sep 10, 2024
4 checks passed
@uk-bolly uk-bolly mentioned this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants