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.

sudo.sls 843B

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233
  1. # vim: sts=2 ts=2 sw=2 et ai
  2. {% from "users/map.jinja" import users with context %}
  3. # Ensure availability of bash
  4. users_bash-package:
  5. pkg.installed:
  6. - name: {{ users.bash_package }}
  7. users_sudo-group:
  8. group.present:
  9. - name: sudo
  10. - system: True
  11. users_sudo-package:
  12. pkg.installed:
  13. - name: {{ users.sudo_package }}
  14. - require:
  15. - group: users_sudo-group
  16. - file: {{ users.sudoers_dir }}
  17. users_{{ users.sudoers_dir }}:
  18. file.directory:
  19. - name: {{ users.sudoers_dir }}
  20. users_sudoer-defaults:
  21. file.append:
  22. - name: {{ users.sudoers_file }}
  23. - require:
  24. - pkg: users_sudo-package
  25. - text:
  26. - Defaults env_reset
  27. - Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  28. - '#includedir {{ users.sudoers_dir }}'