Commit Graph

204 Commits

Author SHA1 Message Date
Pascal de Bruijn
a641d21b15 ci(kitchen): workaround epel dependancy 2022-06-14 14:30:25 +02:00
Pascal de Bruijn
63dd7c88be fix(googleauth): handle disabled selinux 2022-06-14 14:22:39 +02:00
Pascal de Bruijn
3fe875040d fix(googleauth): make sure sshd allows KbdInteractiveAuthentication 2022-06-14 10:40:47 +02:00
Pascal de Bruijn
be3dd4fbf6 feat(googleauth): rhel family support 2022-06-14 09:54:18 +02:00
Pascal de Bruijn
1dcd7d5746 refactor(googleauth): pam handling 2022-06-13 15:03:12 +02:00
Pascal de Bruijn
2a3b67647f fix(googleauth): proper 0700 permissions on secrets directory 2022-06-13 15:03:06 +02:00
Pascal de Bruijn
2205bce19b fix(googleauth): proper 0600 permissions on secret 2022-06-13 10:53:14 +02:00
Unilogic B.V
1dd5f32a52
fix(googleauth): ensure newline is preserved in repl of file.replace 2022-06-09 15:11:00 +01:00
Imran Iqbal
696139a841
refactor(salt-lint): fix violation
```
[213] SaltStack recommends using cmd.run together with onchanges, rather than cmd.wait
users/init.sls:498
  cmd.wait:
```
2022-02-12 23:52:21 +00:00
Imran Iqbal
2a7c0de4aa
test: standardise use of share suite & _mapdata state [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/302
2021-03-23 21:34:51 +00:00
jason shaw
db30289046 style: quote numbers and file modes
salt linters complain about these.
2020-10-02 14:17:25 -04:00
noelmcloughlin
9517e4b069 fix(macos): gid must be numeric on macos 2020-07-25 16:37:26 +02:00
Imran Iqbal
a1ef7e57d9
fix(vimrc): ensure vimrc state runs 2019-11-02 08:52:09 +00:00
Imran Iqbal
560f5e10d9
fix(sudo.sls): fix salt-lint errors
```bash
Examining users/sudo.sls of type state
[201] Trailing whitespace
users/sudo.sls:13
      - file: {{ users.sudoers_dir }}

[201] Trailing whitespace
users/sudo.sls:22
        - name: {{ users.sudoers_file }}
```
2019-10-09 22:27:59 +01:00
Imran Iqbal
4cec0ef4cc
fix(init.sls): fix salt-lint errors
```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}}
```
2019-10-09 22:27:59 +01:00
Imran Iqbal
bb27b940ea
fix(googleauth.sls): fix salt-lint errors
```bash
Examining users/googleauth.sls of type state
[201] Trailing whitespace
users/googleauth.sls:9
      - file: {{ users.googleauth_dir }}

[204] Lines should be no longer that 160 chars
users/googleauth.sls:26
    - repl: "auth       [success=done new_authtok_reqd=done default=die]   pam_google_authenticator.so user=root secret={{ users.googleauth_dir }}/${USER}_{{ svc }} echo_verification_code\n@include common-auth"
```
2019-10-09 22:27:59 +01:00
Imran Iqbal
fa6210dc5b
feat(yamllint): include for this repo and apply rules throughout
* 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)
```
2019-08-16 20:12:03 +01:00
Imran Iqbal
3bcdc902dc
feat(semantic-release): implement for this formula
* 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
2019-08-07 15:20:26 +01:00
Niels Abspoel
5517d954e8
Merge pull request #204 from myii/fix/replace-gid_from_name
fix(init): replace `gid_from_name` (deprecated in `develop`)
2019-08-01 20:38:15 +02:00
Sevrin Robstad
7cf7769a2d adde dir_mode logic for users.files 2019-07-30 12:39:48 +02:00
Imran Iqbal
923b4600f1
fix(init): replace gid_from_name (deprecated in develop)
* Close #198
* All details in that issue
* Solution based upon:
  - https://github.com/saltstack-formulas/vault-formula/pull/35#issuecomment-509854411
2019-07-24 08:22:31 +01:00
Arthur Lutz
8d48adb3a2 [users/init] use createhome from defaults (#202)
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
2019-07-10 15:47:18 +02:00
N
69c65174f1
Merge branch 'master' of https://github.com/saltstack-formulas/users-formula into macos 2019-06-19 08:23:30 +01:00
N
18c5d9e205
Merge branch 'master' into policykit-settings 2019-06-18 15:53:07 +01:00
N
39b6d3c3c5
fix(macos): ensure correct group 2019-06-11 22:14:45 +01:00
Adrien "ze" Urban
c128b1ea28 gid: default to "null"
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.
2019-03-07 14:38:54 +01:00
Adrien "ze" Urban
def8f53932 group: add support for members
members, addusers, delusers, and in pillar examples
2019-03-07 12:03:30 +01:00
Adrien "ze" Urban
7845013a39 groups: support absent like for users.
Also remove warning for passing unknown arguments on group.absent
2019-03-07 11:53:59 +01:00
Lukas Resch
d0e4615453 added OpenBSD data 2019-02-22 10:15:55 +01:00
Jessy
634deacc73 incorporated change suggestions 2019-01-17 13:36:01 +01:00
Jessy
6ed440b66a reworked "createhome" (variable, passwd entry & issue #164) 2019-01-14 14:48:04 +01:00
Michael Zabriskie
0ad7d0764e support password expiration 2019-01-04 10:56:49 -07:00
Arthur Lutz
ae2a63e899
[users/init] use dir_mode in addition to mode
To get it to work with RHEL7 with salt 2018.x
2018-11-06 18:04:15 +01:00
N
b89b62d35c
Allow state to update the gid 2018-10-03 16:54:09 +01:00
Maximilian Zettler
b84e79bd31 fix used_polkit 2018-09-29 13:15:56 +02:00
Niels Abspoel
537d8dd054
Merge pull request #187 from M2Mobi/ssh_known_hosts
Improvements for ssh known hosts handling
2018-09-06 19:51:21 +02:00
Sean Molenaar
3b911cc9cb Add default setting for ssh known hosts fingerprint hash type 2018-09-05 17:42:26 +02:00
Heinz Wiesinger
4bc00d4d62 Replace "hash_hostname" with "hash_known_hosts".
The former is deprecated since Carbon.
2018-09-05 17:35:26 +02:00
Damien Tardy-Panis
8e33bb8aa9 Add possibility to remove user's git config keys 2018-09-05 17:21:37 +02:00
Niels Abspoel
ed02fbc678 fix iteritems 2018-08-24 15:22:00 +02:00
Niels Abspoel
7f9f3df6c7
Merge pull request #144 from sacr0/master
added feature to create groups and set their gid
2018-08-24 15:16:25 +02:00
Maximilian Zettler
0e93ebccdb use do to update dict 2018-08-24 14:25:35 +02:00
Maximilian Zettler
9eedbede74 fix polkit state include 2018-08-24 14:20:43 +02:00
Niels Abspoel
197d6ee561 add import defaults.yaml 2018-07-22 17:12:05 +02:00
N
7ab8f2ed06
Merge pull request #177 from noelmcloughlin/vimrc
Dont require vim-formula by default
2018-07-22 15:28:27 +01:00
Philippe Pepiot
944e904419 Fix default behavior of copying /etc/skel when creating home directory
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.
2018-07-17 18:03:04 +02:00
Arthur Lutz
52ba531d63 [users] add a prereq for createhome to handle the case of an absent subfolder
Fixes #181
2018-07-10 15:51:10 +02:00
N
5b67c5513a
Merge pull request #165 from jdsieci/unique_switch
Unique switch
2018-06-28 10:53:48 +01:00
Niels Abspoel
e33c76edb6
Merge pull request #179 from arthurlogilab/178-exclude-pat
[users/users_files] add exclude_pat to user files (closes #178)
2018-06-22 10:39:34 +02:00
Arthur Lutz
d528e16c5c [users/users_files] use quotes for exclude_pat 2018-06-21 18:22:24 +02:00