Saltstack Official Users Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pillar.example 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. gitconfig:
  77. user.name: B User
  78. user.email: buser@example.com
  79. url."https://".insteadOf: "git://"
  80. google_2fa: True
  81. google_auth:
  82. ssh: |
  83. SOMEGAUTHHASHVAL
  84. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  85. " RATE_LIMIT 3 30 1415800560
  86. " DISALLOW_REUSE 47193352
  87. " TOTP_AUTH
  88. 11111111
  89. 22222222
  90. 33333333
  91. 44444444
  92. 55555555
  93. user_files:
  94. enabled: True
  95. # 'source' allows you to define an arbitrary directory to sync, useful to use for default files.
  96. # should be a salt fileserver path either with or without 'salt://'
  97. # if not present, it defaults to 'salt://users/files/user/<username>
  98. source: users/files/default
  99. ## Absent user
  100. cuser:
  101. absent: True
  102. purge: True
  103. force: True
  104. ## Old syntax of absent_users still supported
  105. absent_users:
  106. - donald
  107. - bad_guy