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.

pillar.example 3.7KB

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