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.

95 line
2.4KB

  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. enforce_password: True
  10. home: /custom/buser
  11. createhome: True
  12. manage_vimrc: False
  13. manage_bashrc: False
  14. manage_profile: False
  15. expire: 16426
  16. sudouser: True
  17. # sudo_rules doesn't need the username as a prefix for the rule
  18. # this is added automatically by the formula.
  19. # ----------------------------------------------------------------------
  20. # In case your sudo_rules have a colon please have in mind to not leave
  21. # spaces around it. For example:
  22. # ALL=(ALL) NOPASSWD: ALL <--- THIS WILL NOT WORK (Besides syntax is ok)
  23. # ALL=(ALL) NOPASSWD:ALL <--- THIS WILL WORK
  24. sudo_rules:
  25. - ALL=(root) /usr/bin/find
  26. - ALL=(otheruser) /usr/bin/script.sh
  27. sudo_defaults:
  28. - '!requiretty'
  29. shell: /bin/bash
  30. prime_group:
  31. name: primarygroup
  32. gid: 500
  33. groups:
  34. - users
  35. ssh_key_type: rsa
  36. # You can inline the private keys ...
  37. ssh_keys:
  38. privkey: PRIVATEKEY
  39. pubkey: PUBLICKEY
  40. # ... or you can pull them from a different pillar,
  41. # for example one called "ssh_keys":
  42. ssh_keys_pillar:
  43. id_rsa: "ssh_keys"
  44. another_key_pair: "ssh_keys"
  45. ssh_auth:
  46. - PUBLICKEY
  47. ssh_auth.absent:
  48. - PUBLICKEY_TO_BE_REMOVED
  49. # Generates an authorized_keys file for the user
  50. # with the given keys
  51. ssh_auth_file:
  52. - PUBLICKEY
  53. # If you prefer to keep public keys as files rather
  54. # than inline in pillar, this works.
  55. ssh_auth_sources:
  56. - salt://keys/buser.id_rsa.pub
  57. # Manage the ~/.ssh/config file
  58. ssh_config:
  59. all:
  60. hostname: "*"
  61. options:
  62. - "StrictHostKeyChecking no"
  63. - "UserKnownHostsFile=/dev/null"
  64. importanthost:
  65. hostname: "needcheck.example.com"
  66. options:
  67. - "StrictHostKeyChecking yes"
  68. google_2fa: True
  69. google_auth:
  70. ssh: |
  71. SOMEGAUTHHASHVAL
  72. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  73. " RATE_LIMIT 3 30 1415800560
  74. " DISALLOW_REUSE 47193352
  75. " TOTP_AUTH
  76. 11111111
  77. 22222222
  78. 33333333
  79. 44444444
  80. 55555555
  81. ## Absent user
  82. cuser:
  83. absent: True
  84. purge: True
  85. force: True
  86. ## Old syntax of absent_users still supported
  87. absent_users:
  88. - donald
  89. - bad_guy