Saltstack Official Users Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

pillar.example 3.8KB

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