0
0
mirror of https://github.com/saltstack-formulas/sudoers-formula.git synced 2024-11-28 02:57:52 +01:00
sudoers-formula/sudoers/init.sls

19 lines
474 B
Plaintext
Raw Normal View History

2015-01-01 23:14:56 +01:00
{% from "sudoers/map.jinja" import sudoers with context %}
2013-08-20 23:32:58 +02:00
sudo:
pkg.installed:
- name: {{ sudoers.pkg }}
2013-08-20 23:32:58 +02:00
2015-01-01 23:14:56 +01:00
{{ sudoers.get('config-path', '/etc') }}/sudoers:
2013-08-20 23:32:58 +02:00
file.managed:
- user: root
2015-01-01 23:14:56 +01:00
- group: {{ sudoers.get('group', 'root') }}
2013-08-20 23:32:58 +02:00
- mode: 440
- template: jinja
- source: salt://sudoers/files/sudoers
- check_cmd: {{ sudoers.get('exec-prefix', '/usr/sbin') }}/visudo -c -f
- context:
included: False
2013-08-20 23:32:58 +02:00
- require:
- pkg: sudo