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
Rule 208 not possible with unarchive or directory with recurse #1064
Comments
I've same issue with
|
As archives can also contain permissions (like tar ones), we should avoid triggering 208 rule when unarchive module is used. Fixes: #1064
As archives can also contain permissions (like tar ones), we should avoid triggering 208 rule when unarchive module is used. Fixes: #1064
Thank you for the pull request to fix the issue with the unarchive module. I described a second issue in my post about the file module with recursive. For example to change the ownership. Then I have a clash between directory permissions (usually 0755) and the files within those directories (usually 0644 or 0660). Do you have any idea how that might be resolved? Or maybe a workaround. Happy to test things. |
If I remember well if recursive is true Cheap workaround would be to add |
Summary
How can one set a mode on the "unarchive" module and on the file module with state:directory and recurse: yes so that rule 208 is ok?
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Linux
STEPS TO REPRODUCE
unarchive example from the ansible documentation
file module example with state: directory and recurse: yes from documentation
command
example playbook
Desired Behaviour
ansible-lint reports no problems.
Actual Behaviour
ansible-lint rule 208 requires a mode for the ansible module
unarchive
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.htmlHowever the archive might contain files with different permissions (eg. an executable and a README, License, etc.) and therefore there is no single mode that's fitting for all unarchived contents.
ansible-lint rule 208 also requires that a mode is set for the
file
module https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.htmlThis is problematic in case I apply the module towards a directory with recurse: yes (eg. to change the owner recursively) as directories mainly have
0755
and the containing files are not necessarily executable.The text was updated successfully, but these errors were encountered: