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