Saltstack Official Users Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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