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.

map.jinja 1.9KB

7 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # vim: sts=2 ts=2 sw=2 et ai
  2. {% set users = salt['grains.filter_by']({
  3. 'Debian': {
  4. 'sudoers_dir': '/etc/sudoers.d',
  5. 'sudoers_file': '/etc/sudoers',
  6. 'googleauth_dir': '/etc/google_authenticator.d',
  7. 'root_group': 'root',
  8. 'shell': '/bin/bash',
  9. 'visudo_shell': '/bin/bash',
  10. 'bash_package': 'bash',
  11. 'sudo_package': 'sudo',
  12. 'googleauth_package': 'libpam-google-authenticator',
  13. },
  14. 'Gentoo': {
  15. 'sudoers_dir': '/etc/sudoers.d',
  16. 'sudoers_file': '/etc/sudoers',
  17. 'googleauth_dir': '/etc/google_authenticator.d',
  18. 'root_group': 'root',
  19. 'shell': '/bin/bash',
  20. 'visudo_shell': '/bin/bash',
  21. 'bash_package': 'app-shells/bash',
  22. 'sudo_package': 'app-admin/sudo',
  23. 'googleauth_package': 'libpam-google-authenticator',
  24. },
  25. 'FreeBSD': {
  26. 'sudoers_dir': '/usr/local/etc/sudoers.d',
  27. 'sudoers_file': '/usr/local/etc/sudoers',
  28. 'googleauth_dir': '/usr/local/etc/google_authenticator.d',
  29. 'root_group': 'wheel',
  30. 'shell': '/bin/csh',
  31. 'visudo_shell': '/usr/local/bin/bash',
  32. 'bash_package': 'bash',
  33. 'sudo_package': 'sudo',
  34. 'googleauth_package': 'pam_google_authenticator',
  35. },
  36. 'Solaris': {
  37. 'sudoers_dir': '/opt/local/etc/sudoers.d',
  38. 'sudoers_file': '/opt/local/etc/sudoers',
  39. 'googleauth_dir': '/opt/local/etc/google_authenticator.d',
  40. 'root_group': 'root',
  41. 'shell': '/bin/bash',
  42. 'visudo_shell': '/bin/bash',
  43. 'bash_package': 'bash',
  44. 'sudo_package': 'sudo',
  45. 'googleauth_package': 'libpam-google-authenticator',
  46. },
  47. 'default': {
  48. 'sudoers_dir': '/etc/sudoers.d',
  49. 'sudoers_file': '/etc/sudoers',
  50. 'googleauth_dir': '/etc/google_authenticator.d',
  51. 'root_group': 'root',
  52. 'shell': '/bin/bash',
  53. 'visudo_shell': '/bin/bash',
  54. 'bash_package': 'bash',
  55. 'sudo_package': 'sudo',
  56. 'googleauth_package': 'libpam-google-authenticator',
  57. },
  58. }, merge=salt['pillar.get']('users-formula:lookup')) %}