Saltstack Official Users Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pillar.example 3.6KB

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