This fixes a change introduced by 634deac where createhome was changed from True to False (by default).
This change honnor the default "global default" "users.createhome" from defaults.sls
using `|json` would let the state get an error if gid is a string, as it would
not be converted.
Using directly the `None` yaml value, and letting numbers as string be
converted by yaml parser.
Since https://github.com/saltstack-formulas/users-formula/pull/182 the
home directory was created by salt which prevent "adduser" behavior to
copy /etc/skel in newly created directory.
Ensure the parent directory of the home dir is existing instead.
The state will not fail gracefully, instead you will get
an error like this one:
ID: users_rhertzog_user_gitconfig_0
Function: git.config_set
Name: alias.br
Result: False
Comment: State 'git.config_set' was not found in SLS 'users'
Reason: 'git' __virtual__ returned False
Changes:
And since pillar data can't be (easily) tuned according to minion's
status, we really need this check here.
My tests with Salt 2017.7.3 have shown that cmd.has_exec() is reliable
for this, contrary the what the comment was implying.
* Add support for 'template' in 'user_files'
* Fix-up wrong nesting level for template value
* Small quality improvement for push upstream.
* Consistency improvement for variable name
Fixing my previous change which errors in a particular scenario.
Error: Conflicting ID 'users_ssh_auth_source_username_0' when keys are added and removed simultaneously.