saltstack-formulas / users-formula

Configure users via pillar
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
99 stars 362 forks source link

perf(users/init.sls): dedup groups and directories creation #223

Open stasjok opened 3 years ago

stasjok commented 3 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

Pillar / config required to test the proposed changes

groups:
  sudo_adm:
    system: yes

users:
  root:
    password: '!'
    user_dir_mode: 700
    ssh_auth_file: some_key
  test1:
    groups:
      - sudo_adm
      - test_group1
  test2:
    groups:
      - sudo_adm
      - test_group1
      - test_group2
  test3:
    home: /tmp/some/random/homedir
    prime_group:
      name: users
    groups:
      - test_group2
  test4:
    createhome: no
    prime_group:
      name: users

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context