0
0
mirror of https://github.com/saltstack-formulas/users-formula.git synced 2024-11-27 22:38:34 +01:00
users-formula/users/sudo.sls
Imran Iqbal 560f5e10d9
fix(sudo.sls): fix salt-lint errors
```bash
Examining users/sudo.sls of type state
[201] Trailing whitespace
users/sudo.sls:13
      - file: {{ users.sudoers_dir }}

[201] Trailing whitespace
users/sudo.sls:22
        - name: {{ users.sudoers_file }}
```
2019-10-09 22:27:59 +01:00

29 lines
777 B
Plaintext

# 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-package:
pkg.installed:
- name: {{ users.sudo_package }}
- require:
- file: {{ users.sudoers_dir }}
- unless: test "`uname`" = "Darwin"
users_{{ users.sudoers_dir }}:
file.directory:
- name: {{ users.sudoers_dir }}
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 }}'