```bash
Examining users/init.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
users/init.sls:176
- expire: {{ (user['expire'] / 86400) | int}}
[206] Jinja variables should have spaces before and after: {{ var_name }}
users/init.sls:202
- {{optional_group}}
```
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix errors shown below:
```bash
users-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./users/defaults.yaml
4:1 warning missing document start "---" (document-start)
5:20 warning truthy value should be one of [false, true] (truthy)
8:21 warning truthy value should be one of [false, true] (truthy)
9:15 warning truthy value should be one of [false, true] (truthy)
10:1 error too many blank lines (1 > 0) (empty-lines)
pillar.example
5:20 warning truthy value should be one of [false, true] (truthy)
14:13 warning truthy value should be one of [false, true] (truthy)
16:13 warning truthy value should be one of [false, true] (truthy)
19:13 warning truthy value should be one of [false, true] (truthy)
23:13 warning truthy value should be one of [false, true] (truthy)
25:5 error wrong indentation: expected 6 but found 4 (indentation)
37:23 warning truthy value should be one of [false, true] (truthy)
40:21 warning truthy value should be one of [false, true] (truthy)
41:20 warning truthy value should be one of [false, true] (truthy)
42:13 warning truthy value should be one of [false, true] (truthy)
47:17 warning truthy value should be one of [false, true] (truthy)
51:19 warning truthy value should be one of [false, true] (truthy)
52:23 warning truthy value should be one of [false, true] (truthy)
53:20 warning truthy value should be one of [false, true] (truthy)
54:21 warning truthy value should be one of [false, true] (truthy)
58:15 warning truthy value should be one of [false, true] (truthy)
59:15 warning truthy value should be one of [false, true] (truthy)
73:18 warning truthy value should be one of [false, true] (truthy)
75:20 warning truthy value should be one of [false, true] (truthy)
90:7 error duplication of key "privkey" in mapping (key-duplicates)
91:7 error duplication of key "pubkey" in mapping (key-duplicates)
117:44 warning too few spaces before comment (comments)
125:27 warning truthy value should be one of [false, true] (truthy)
153:17 warning truthy value should be one of [false, true] (truthy)
167:13 warning truthy value should be one of [false, true] (truthy)
171:16 warning truthy value should be one of [false, true] (truthy)
172:89 error line too long (102 > 88 characters) (line-length)
177:89 error line too long (102 > 88 characters) (line-length)
178:89 error line too long (100 > 88 characters) (line-length)
181:89 error line too long (94 > 88 characters) (line-length)
188:13 warning truthy value should be one of [false, true] (truthy)
189:12 warning truthy value should be one of [false, true] (truthy)
190:12 warning truthy value should be one of [false, true] (truthy)
test/salt/pillar/default.sls
25:89 error line too long (91 > 88 characters) (line-length)
175:89 error line too long (102 > 88 characters) (line-length)
180:89 error line too long (102 > 88 characters) (line-length)
181:89 error line too long (100 > 88 characters) (line-length)
184:89 error line too long (94 > 88 characters) (line-length)
```
* Based on `ssf-formula` (v0.3.0)
- https://github.com/myii/ssf-formula/pull/5
* Unable to use `pillar.example` directly for testing
- Used it as a basis for `test/salt/pillar/default.sls`
- Brought useful changes back to `pillar.example`
* Fix: avoid `users/googleauth.sls` for `RedHat` & `Suse`
* Close#203
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.