0
0
mirror of https://github.com/saltstack-formulas/users-formula.git synced 2024-12-01 04:11:32 +01:00
users-formula/users/sudo.sls

34 lines
843 B
Plaintext
Raw Normal View History

# vim: sts=2 ts=2 sw=2 et ai
{% from "users/map.jinja" import users with context %}
# Ensure availability of bash
users_bash-package:
pkg.installed:
- name: {{ users.bash_package }}
users_sudo-group:
group.present:
- name: sudo
2013-06-19 21:53:46 +02:00
- system: True
users_sudo-package:
pkg.installed:
- name: {{ users.sudo_package }}
2013-06-19 21:53:46 +02:00
- require:
- group: users_sudo-group
- file: {{ users.sudoers_dir }}
2013-06-19 21:53:46 +02:00
users_{{ users.sudoers_dir }}:
file.directory:
- name: {{ users.sudoers_dir }}
2013-06-19 21:53:46 +02:00
users_sudoer-defaults:
2013-06-19 21:53:46 +02:00
file.append:
- name: {{ users.sudoers_file }}
2013-06-19 21:53:46 +02:00
- require:
- pkg: users_sudo-package
2013-06-19 21:53:46 +02:00
- text:
- Defaults env_reset
- Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- '#includedir {{ users.sudoers_dir }}'