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.

201 Zeilen
5.7KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. users-formula:
  5. use_vim_formula: true
  6. lookup: # override the defauls in map.jinja
  7. root_group: root
  8. # group initialization
  9. groups:
  10. foo:
  11. state: present
  12. gid: 1500
  13. system: false
  14. badguys:
  15. absent: true
  16. niceguys:
  17. gid: 4242
  18. system: false
  19. addusers:
  20. - root
  21. delusers:
  22. - toor
  23. ssl-cert:
  24. system: true
  25. members:
  26. - www-data
  27. - openldap
  28. users:
  29. ## Minimal required pillar values
  30. auser:
  31. fullname: A User
  32. ## Full list of pillar values
  33. buser:
  34. fullname: B User
  35. password: $6$w.............
  36. enforce_password: true
  37. # WARNING: If 'empty_password' is set to true, the 'password' statement
  38. # will be ignored by enabling password-less login for the user.
  39. empty_password: false
  40. hash_password: false
  41. system: false
  42. home: /custom/buser
  43. homedir_owner: buser
  44. homedir_group: primarygroup
  45. user_dir_mode: 750
  46. createhome: true
  47. roomnumber: "A-1"
  48. workphone: "(555) 555-5555"
  49. homephone: "(555) 555-5551"
  50. manage_vimrc: false
  51. allow_gid_change: false
  52. manage_bashrc: false
  53. manage_profile: false
  54. expire: 16426
  55. # Disables user management except sudo rules.
  56. # Useful for setting sudo rules for system accounts created by package instalation
  57. sudoonly: false
  58. sudouser: true
  59. # sudo_rules doesn't need the username as a prefix for the rule
  60. # this is added automatically by the formula.
  61. # ----------------------------------------------------------------------
  62. # In case your sudo_rules have a colon please have in mind to not leave
  63. # spaces around it. For example:
  64. # ALL=(ALL) NOPASSWD: ALL <--- THIS WILL NOT WORK (Besides syntax is ok)
  65. # ALL=(ALL) NOPASSWD:ALL <--- THIS WILL WORK
  66. sudo_rules:
  67. - ALL=(root) /usr/bin/find
  68. - ALL=(otheruser) /usr/bin/script.sh
  69. sudo_defaults:
  70. - '!requiretty'
  71. # enable polkitadmin to make user an AdminIdentity for polkit
  72. polkitadmin: true
  73. shell: /bin/bash
  74. remove_groups: false
  75. prime_group:
  76. name: primarygroup
  77. gid: 1501
  78. groups:
  79. - users
  80. optional_groups:
  81. - some_groups_that_might
  82. - not_exist_on_all_minions
  83. ssh_key_type: rsa
  84. ssh_keys:
  85. # You can inline the private keys ...
  86. # privkey: PRIVATEKEY
  87. # pubkey: PUBLICKEY
  88. # or you can provide path to key on Salt fileserver
  89. privkey: salt://path_to_PRIVATEKEY
  90. pubkey: salt://path_to_PUBLICKEY
  91. # you can provide multiple keys, the keyname is taken as filename
  92. # make sure your public keys suffix is .pub
  93. foobar: PRIVATEKEY
  94. foobar.pub: PUBLICKEY
  95. # ... or you can pull them from a different pillar,
  96. # for example one called "ssh_keys":
  97. ssh_keys_pillar:
  98. id_rsa: "ssh_keys"
  99. another_key_pair: "ssh_keys"
  100. ssh_auth:
  101. - PUBLICKEY
  102. ssh_auth.absent:
  103. - PUBLICKEY_TO_BE_REMOVED
  104. # Generates an authorized_keys file for the user
  105. # with the given keys
  106. ssh_auth_file:
  107. - PUBLICKEY
  108. # ... or you can pull them from a different pillar similar to ssh_keys_pillar
  109. ssh_auth_pillar:
  110. id_rsa: "ssh_keys"
  111. # If you prefer to keep public keys as files rather
  112. # than inline in pillar, this works.
  113. ssh_auth_sources:
  114. - salt://keys/buser.id_rsa.pub
  115. ssh_auth_sources.absent:
  116. - salt://keys/deleteduser.id_rsa.pub # PUBLICKEY_FILE_TO_BE_REMOVED
  117. # Manage the ~/.ssh/config file
  118. ssh_known_hosts:
  119. importanthost:
  120. port: 22
  121. fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
  122. key: PUBLICKEY
  123. enc: ssh-rsa
  124. hash_known_hosts: true
  125. timeout: 5
  126. fingerprint_hash_type: sha256
  127. ssh_known_hosts.absent:
  128. - notimportanthost
  129. ssh_config:
  130. all:
  131. hostname: "*"
  132. options:
  133. - "StrictHostKeyChecking no"
  134. - "UserKnownHostsFile=/dev/null"
  135. importanthost:
  136. hostname: "needcheck.example.com"
  137. options:
  138. - "StrictHostKeyChecking yes"
  139. # Using gitconfig without Git installed will result in an error
  140. # https://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html:
  141. # This state module now requires git 1.6.5 (released 10 October 2009) or newer.
  142. gitconfig:
  143. user.name: B User
  144. user.email: buser@example.com
  145. "url.https://.insteadOf": "git://"
  146. gitconfig.absent:
  147. - push.default
  148. - color\..+
  149. google_2fa: true
  150. google_auth:
  151. sshd: |
  152. SOMEGAUTHHASHVAL
  153. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  154. " RATE_LIMIT 3 30 1415800560
  155. " DISALLOW_REUSE 47193352
  156. " TOTP_AUTH
  157. 11111111
  158. 22222222
  159. 33333333
  160. 44444444
  161. 55555555
  162. # unique: true allows user to have non unique uid
  163. unique: false
  164. uid: 1001
  165. user_files:
  166. enabled: true
  167. # 'source' allows you to define an arbitrary directory to sync,
  168. # useful to use for default files.
  169. # should be a salt fileserver path either with or without 'salt://'
  170. # if not present, it defaults to 'salt://users/files/user/<username>
  171. source: users/files
  172. # template: jinja
  173. # You can specify octal mode for files and symlinks that will be copied.
  174. # Since version 2016.11.0 it's possible to use 'keep' for file_mode,
  175. # to preserve file original mode, thus you can save execution bit for example.
  176. file_mode: keep
  177. # You can specify octal mode for directories as well.
  178. # This won't work on Windows minions
  179. # dir_mode: 775
  180. sym_mode: 640
  181. exclude_pat: "*.gitignore"
  182. ## Absent user
  183. cuser:
  184. absent: true
  185. purge: true
  186. force: true
  187. ## Old syntax of absent_users still supported
  188. absent_users:
  189. - donald
  190. - bad_guy