content
content copied to clipboard
Template or macro for umask related rules
Description of problem:
The following rules intend to adjust the umask value in different files:
- accounts_umask_etc_bashrc
- accounts_umask_etc_csh_cshrc
- accounts_umask_etc_login_defs
- accounts_umask_etc_profile
- accounts_umask_interactive_users
While the accounts_umask_interactive_users is more specific, the other rules are pretty similar and are using repeated code.
There is an opportunity to make it better using Jinja2 macros, creating a template (if worth) or even using existing templates (if any can be used).
The proper solution demands a deeper analysis of the options, but all options are relatively simple.
There was an improvement on Ansible remediation through the PR https://github.com/ComplianceAsCode/content/pull/8920 which should be taken in account when working on this issue.