Saltstack Official Users Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.9KB

  1. users:
  2. ## Minimal required pillar values
  3. auser:
  4. fullname: A User
  5. ## Full list of pillar values
  6. buser:
  7. fullname: B User
  8. password: $6$w.............
  9. home: /custom/buser
  10. createhome: True
  11. expire: 16426
  12. sudouser: True
  13. sudo_rules:
  14. - ALL=(root) /usr/bin/find
  15. - ALL=(otheruser) /usr/bin/script.sh
  16. sudo_defaults:
  17. - '!requiretty'
  18. shell: /bin/bash
  19. prime_group:
  20. name: primarygroup
  21. gid: 500
  22. groups:
  23. - users
  24. ssh_key_type: rsa
  25. # You can inline the private keys ...
  26. ssh_keys:
  27. privkey: PRIVATEKEY
  28. pubkey: PUBLICKEY
  29. # ... or you can pull them from a different pillar,
  30. # for example one called "ssh_keys":
  31. ssh_keys_pillar:
  32. id_rsa: "ssh_keys"
  33. another_key_pair: "ssh_keys"
  34. ssh_auth:
  35. - PUBLICKEY
  36. ssh_auth.absent:
  37. - PUBLICKEY_TO_BE_REMOVED
  38. # Generates an authorized_keys file for the user
  39. # with the given keys
  40. ssh_auth_file:
  41. - PUBLICKEY
  42. # If you prefer to keep public keys as files rather
  43. # than inline in pillar, this works.
  44. ssh_auth_sources:
  45. - salt://keys/buser.id_rsa.pub
  46. # Manage the ~/.ssh/config file
  47. ssh_config:
  48. all:
  49. hostname: "*"
  50. options:
  51. - "StrictHostKeyChecking no"
  52. - "UserKnownHostsFile=/dev/null"
  53. importanthost:
  54. hostname: "needcheck.example.com"
  55. options:
  56. - "StrictHostKeyChecking yes"
  57. google_auth:
  58. ssh: |
  59. SOMEGAUTHHASHVAL
  60. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  61. " RATE_LIMIT 3 30 1415800560
  62. " DISALLOW_REUSE 47193352
  63. " TOTP_AUTH
  64. 11111111
  65. 22222222
  66. 33333333
  67. 44444444
  68. 55555555
  69. ## Absent user
  70. cuser:
  71. absent: True
  72. purge: True
  73. force: True
  74. ## Old syntax of absent_users still supported
  75. absent_users:
  76. - donald
  77. - bad_guy