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.

131 line
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. system: False
  14. home: /custom/buser
  15. user_dir_mode: 750
  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. remove_groups: False
  39. prime_group:
  40. name: primarygroup
  41. gid: 500
  42. groups:
  43. - users
  44. optional_groups:
  45. - some_groups_that_might
  46. - not_exist_on_all_minions
  47. ssh_key_type: rsa
  48. # You can inline the private keys ...
  49. ssh_keys:
  50. privkey: PRIVATEKEY
  51. pubkey: PUBLICKEY
  52. # ... or you can pull them from a different pillar,
  53. # for example one called "ssh_keys":
  54. ssh_keys_pillar:
  55. id_rsa: "ssh_keys"
  56. another_key_pair: "ssh_keys"
  57. ssh_auth:
  58. - PUBLICKEY
  59. ssh_auth.absent:
  60. - PUBLICKEY_TO_BE_REMOVED
  61. # Generates an authorized_keys file for the user
  62. # with the given keys
  63. ssh_auth_file:
  64. - PUBLICKEY
  65. # ... or you can pull them from a different pillar similar to ssh_keys_pillar
  66. ssh_auth_pillar:
  67. id_rsa: "ssh_keys"
  68. # If you prefer to keep public keys as files rather
  69. # than inline in pillar, this works.
  70. ssh_auth_sources:
  71. - salt://keys/buser.id_rsa.pub
  72. # Manage the ~/.ssh/config file
  73. ssh_known_hosts:
  74. importanthost:
  75. fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
  76. ssh_known_hosts.absent:
  77. - notimportanthost
  78. ssh_config:
  79. all:
  80. hostname: "*"
  81. options:
  82. - "StrictHostKeyChecking no"
  83. - "UserKnownHostsFile=/dev/null"
  84. importanthost:
  85. hostname: "needcheck.example.com"
  86. options:
  87. - "StrictHostKeyChecking yes"
  88. # Using gitconfig without Git installed will result in an error
  89. # https://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html:
  90. # This state module now requires git 1.6.5 (released 10 October 2009) or newer.
  91. gitconfig:
  92. user.name: B User
  93. user.email: buser@example.com
  94. url."https://".insteadOf: "git://"
  95. google_2fa: True
  96. google_auth:
  97. ssh: |
  98. SOMEGAUTHHASHVAL
  99. " RESETTING_TIME_SKEW 46956472+2 46991595-2
  100. " RATE_LIMIT 3 30 1415800560
  101. " DISALLOW_REUSE 47193352
  102. " TOTP_AUTH
  103. 11111111
  104. 22222222
  105. 33333333
  106. 44444444
  107. 55555555
  108. uid: 1001
  109. user_files:
  110. enabled: True
  111. # 'source' allows you to define an arbitrary directory to sync, useful to use for default files.
  112. # should be a salt fileserver path either with or without 'salt://'
  113. # if not present, it defaults to 'salt://users/files/user/<username>
  114. source: users/files/default
  115. ## Absent user
  116. cuser:
  117. absent: True
  118. purge: True
  119. force: True
  120. ## Old syntax of absent_users still supported
  121. absent_users:
  122. - donald
  123. - bad_guy