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.

40 lines
1.1KB

  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. 'root_group': 'root',
  7. 'shell': '/bin/bash',
  8. 'visudo_shell': '/bin/bash',
  9. 'bash_package': 'bash',
  10. 'sudo_package': 'sudo',
  11. },
  12. 'Gentoo': {
  13. 'sudoers_dir': '/etc/sudoers.d/',
  14. 'sudoers_file': '/etc/sudoers',
  15. 'root_group': 'root',
  16. 'shell': '/bin/bash',
  17. 'visudo_shell': '/bin/bash',
  18. 'bash_package': 'app-shells/bash',
  19. 'sudo_package': 'app-admin/sudo',
  20. },
  21. 'FreeBSD': {
  22. 'sudoers_dir': '/usr/local/etc/sudoers.d/',
  23. 'sudoers_file': '/usr/local/etc/sudoers',
  24. 'root_group': 'wheel',
  25. 'shell': '/bin/csh',
  26. 'visudo_shell': '/usr/local/bin/bash',
  27. 'bash_package': 'bash',
  28. 'sudo_package': 'sudo',
  29. },
  30. 'default': {
  31. 'sudoers_dir': '/etc/sudoers.d/',
  32. 'sudoers_file': '/etc/sudoers',
  33. 'root_group': 'root',
  34. 'shell': '/bin/bash',
  35. 'visudo_shell': '/bin/bash',
  36. 'bash_package': 'bash',
  37. 'sudo_package': 'sudo',
  38. },
  39. }, merge=salt['pillar.get']('users:lookup')) %}