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.

pillar.example 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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_known_hosts:
  62. importanthost:
  63. fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
  64. ssh_known_hosts.absent:
  65. - notimportanthost
  66. ssh_config:
  67. all:
  68. hostname: "*"
  69. options:
  70. - "StrictHostKeyChecking no"
  71. - "UserKnownHostsFile=/dev/null"
  72. importanthost:
  73. hostname: "needcheck.example.com"
  74. options:
  75. - "StrictHostKeyChecking yes"
  76. google_2fa: True
  77. google_auth:
  78. ssh: |
  79. SOMEGAUTHHASHVAL
  80. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  81. " RATE_LIMIT 3 30 1415800560
  82. " DISALLOW_REUSE 47193352
  83. " TOTP_AUTH
  84. 11111111
  85. 22222222
  86. 33333333
  87. 44444444
  88. 55555555
  89. user_files:
  90. enabled: True
  91. # 'source' allows you to define an arbitrary directory to sync, useful to use for default files.
  92. # should be a salt fileserver path either with or without 'salt://'
  93. # if not present, it defaults to 'salt://users/files/user/<username>
  94. source: users/files/default
  95. ## Absent user
  96. cuser:
  97. absent: True
  98. purge: True
  99. force: True
  100. ## Old syntax of absent_users still supported
  101. absent_users:
  102. - donald
  103. - bad_guy