Conversation
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
|
It would be more flexible, yes. If we could do it in a backwards compatible way, it would be best.
We could use an We could also introduce a new variable
Can you expand on what you mean with this? |
Well the current proposal is backwards compatible but a bit ugly since the checks for list or string in YAML are difficult. Basically every string is also a list, so I cannot check explicitly for
Yeah, thought about that, also not a fan. This is what argument spec is for.
We could just concantenate them but then we would have two variable to set users. Not a bad thing, but also not easy to understand for a new user. Seems a bit overkill here.
Currently we do not check the datatype of see: ansible-collection-hardening/roles/ssh_hardening/meta/argument_specs.yml Lines 129 to 132 in ac522c4 |
This makes our ssh_hardening role accept both strings and lists for
ssh_allow_users.@rndmh3ro WDYT?
Initially I thought this may be a good idea to allow more flexible use. But there is also an overlap with our documentation that states this should be a string since a long time. Also if we allow two types to be passed here we cannot use argument spec to check the variable anymore.
The alternative would be to add a type check to argument spec and simply fail before executing.
closes #838