Saltstack Official Users Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

127 lines
3.7KB

  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. # WARNING: If 'empty_password' is set to True, the 'password' statement
  11. # will be ignored by enabling password-less login for the user.
  12. empty_password: False
  13. home: /custom/buser
  14. homedir_owner: buser
  15. homedir_group: primarygroup
  16. createhome: True
  17. roomnumber: "A-1"
  18. workphone: "(555) 555-5555"
  19. homephone: "(555) 555-5551"
  20. manage_vimrc: False
  21. manage_bashrc: False
  22. manage_profile: False
  23. expire: 16426
  24. sudouser: True
  25. # sudo_rules doesn't need the username as a prefix for the rule
  26. # this is added automatically by the formula.
  27. # ----------------------------------------------------------------------
  28. # In case your sudo_rules have a colon please have in mind to not leave
  29. # spaces around it. For example:
  30. # ALL=(ALL) NOPASSWD: ALL <--- THIS WILL NOT WORK (Besides syntax is ok)
  31. # ALL=(ALL) NOPASSWD:ALL <--- THIS WILL WORK
  32. sudo_rules:
  33. - ALL=(root) /usr/bin/find
  34. - ALL=(otheruser) /usr/bin/script.sh
  35. sudo_defaults:
  36. - '!requiretty'
  37. shell: /bin/bash
  38. prime_group:
  39. name: primarygroup
  40. gid: 500
  41. groups:
  42. - users
  43. ssh_key_type: rsa
  44. # You can inline the private keys ...
  45. ssh_keys:
  46. privkey: PRIVATEKEY
  47. pubkey: PUBLICKEY
  48. # ... or you can pull them from a different pillar,
  49. # for example one called "ssh_keys":
  50. ssh_keys_pillar:
  51. id_rsa: "ssh_keys"
  52. another_key_pair: "ssh_keys"
  53. ssh_auth:
  54. - PUBLICKEY
  55. ssh_auth.absent:
  56. - PUBLICKEY_TO_BE_REMOVED
  57. # Generates an authorized_keys file for the user
  58. # with the given keys
  59. ssh_auth_file:
  60. - PUBLICKEY
  61. # ... or you can pull them from a different pillar similar to ssh_keys_pillar
  62. ssh_auth_pillar:
  63. id_rsa: "ssh_keys"
  64. # If you prefer to keep public keys as files rather
  65. # than inline in pillar, this works.
  66. ssh_auth_sources:
  67. - salt://keys/buser.id_rsa.pub
  68. # Manage the ~/.ssh/config file
  69. ssh_known_hosts:
  70. importanthost:
  71. fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
  72. ssh_known_hosts.absent:
  73. - notimportanthost
  74. ssh_config:
  75. all:
  76. hostname: "*"
  77. options:
  78. - "StrictHostKeyChecking no"
  79. - "UserKnownHostsFile=/dev/null"
  80. importanthost:
  81. hostname: "needcheck.example.com"
  82. options:
  83. - "StrictHostKeyChecking yes"
  84. # Using gitconfig without Git installed will result in an error
  85. # https://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html:
  86. # This state module now requires git 1.6.5 (released 10 October 2009) or newer.
  87. gitconfig:
  88. user.name: B User
  89. user.email: buser@example.com
  90. url."https://".insteadOf: "git://"
  91. google_2fa: True
  92. google_auth:
  93. ssh: |
  94. SOMEGAUTHHASHVAL
  95. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  96. " RATE_LIMIT 3 30 1415800560
  97. " DISALLOW_REUSE 47193352
  98. " TOTP_AUTH
  99. 11111111
  100. 22222222
  101. 33333333
  102. 44444444
  103. 55555555
  104. uid: 1001
  105. user_files:
  106. enabled: True
  107. # 'source' allows you to define an arbitrary directory to sync, useful to use for default files.
  108. # should be a salt fileserver path either with or without 'salt://'
  109. # if not present, it defaults to 'salt://users/files/user/<username>
  110. source: users/files/default
  111. ## Absent user
  112. cuser:
  113. absent: True
  114. purge: True
  115. force: True
  116. ## Old syntax of absent_users still supported
  117. absent_users:
  118. - donald
  119. - bad_guy