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 779B

11 jaren geleden
11 jaren geleden
12345678910111213141516171819202122232425262728
  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-package:
  8. pkg.installed:
  9. - name: {{ users.sudo_package }}
  10. - require:
  11. - file: {{ users.sudoers_dir }}
  12. - unless: test "`uname`" = "Darwin"
  13. users_{{ users.sudoers_dir }}:
  14. file.directory:
  15. - name: {{ users.sudoers_dir }}
  16. users_sudoer-defaults:
  17. file.append:
  18. - name: {{ users.sudoers_file }}
  19. - require:
  20. - pkg: users_sudo-package
  21. - text:
  22. - Defaults env_reset
  23. - Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  24. - '#includedir {{ users.sudoers_dir }}'