Saltstack Official Users Formula
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

105 Zeilen
2.8KB

  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. # ... or you can pull them from a different pillar similar to ssh_keys_pillar
  54. ssh_auth_pillar:
  55. id_rsa: "ssh_keys"
  56. # If you prefer to keep public keys as files rather
  57. # than inline in pillar, this works.
  58. ssh_auth_sources:
  59. - salt://keys/buser.id_rsa.pub
  60. # Manage the ~/.ssh/config file
  61. ssh_config:
  62. all:
  63. hostname: "*"
  64. options:
  65. - "StrictHostKeyChecking no"
  66. - "UserKnownHostsFile=/dev/null"
  67. importanthost:
  68. hostname: "needcheck.example.com"
  69. options:
  70. - "StrictHostKeyChecking yes"
  71. google_2fa: True
  72. google_auth:
  73. ssh: |
  74. SOMEGAUTHHASHVAL
  75. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  76. " RATE_LIMIT 3 30 1415800560
  77. " DISALLOW_REUSE 47193352
  78. " TOTP_AUTH
  79. 11111111
  80. 22222222
  81. 33333333
  82. 44444444
  83. 55555555
  84. user_files:
  85. enabled: True
  86. # 'source' allows you to define an arbitrary directory to sync, useful to use for default files.
  87. # should be a salt fileserver path either with or without 'salt://'
  88. # if not present, it defaults to 'salt://users/files/user/<username>
  89. source: users/files/default
  90. ## Absent user
  91. cuser:
  92. absent: True
  93. purge: True
  94. force: True
  95. ## Old syntax of absent_users still supported
  96. absent_users:
  97. - donald
  98. - bad_guy