-
Notifications
You must be signed in to change notification settings - Fork 747
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
Inconsistent use of role vars/role defaults #284
Comments
Hey @nodiscc, thanks for this issue!
We try to follow the Ansible standard here:
In
This is therefore a bug. Thank you for noticing - I'll fix this. |
fixes #284 Signed-off-by: Sebastian Gumprich <[email protected]>
fixes #284 Signed-off-by: Sebastian Gumprich <[email protected]>
Ok then, glad I could help. The remaining variables in |
Thanks for your help! |
make ssh client-side compression configurable
make ssh client-side compression configurable
fixes dev-sec#284 Signed-off-by: Sebastian Gumprich <[email protected]>
Describe the bug
Use of role vars and role defaults is inconsistent/unclear to me in ansible-os-hardening.
Expected behavior
I believe most variables set by this role should be overrideable using
host_vars
orgroup_vars
if the need arises to deviate from a strictly hardened config.Variable precedence tells us role vars can only be overriden by the user from a very limited set of vars sources (realistically, only extra vars passed through command line). Values that are expected to be changed from the playbook shoulg rather go in
defaults/
.Actual behavior
For example in this PR,
hidepid_option
value can not be overriden by host/group vars.OS / Environment
Any.
Ansible Version
Any.
Role Version
Any.
Additional context
If my reasoning is correct, the only correct use of role vars is through includes on specific conditions (for example
ansible_local.os_release
or similar), when the value is not expected to be changeable by the user.Can you clarify what dictates whether a variable should go in
vars/
ordefaults/
in this role?The text was updated successfully, but these errors were encountered: