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.

48 lines
1.5KB

  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. 'default': {
  37. 'sudoers_dir': '/etc/sudoers.d',
  38. 'sudoers_file': '/etc/sudoers',
  39. 'googleauth_dir': '/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. }, merge=salt['pillar.get']('users:lookup')) %}