Added archlinux support and improved lookup table

This commit is contained in:
Niels Abspoel 2015-01-01 23:19:47 +01:00
parent 78b8323716
commit c2265a81f6
2 changed files with 12 additions and 11 deletions

View File

@ -2,7 +2,7 @@
sudo: sudo:
pkg.installed: pkg.installed:
- name: {{ sudoers.pkgs|json }} - name: {{ sudoers.pkg }}
{{ sudoers.get('config-path', '/etc') }}/sudoers: {{ sudoers.get('config-path', '/etc') }}/sudoers:
file.managed: file.managed:

View File

@ -1,13 +1,14 @@
{% set sudoers = salt['grains.filter_by'])({ {% set sudoers = salt['grains.filter_by']({
'Debian': {'sudo': 'sudo'}, 'Debian': {'pkg': 'sudo'},
'Ubuntu': {'sudo': 'sudo'}, 'Ubuntu': {'pkg': 'sudo'},
'CentOS': {'sudo': 'sudo'}, 'CentOS': {'pkg': 'sudo'},
'Fedora': {'sudo': 'sudo'}, 'Fedora': {'pkg': 'sudo'},
'RedHat': {'sudo': 'sudo'}, 'RedHat': {'pkg': 'sudo'},
'Amazon': {'sudo': 'sudo'}, 'Amazon': {'pkg': 'sudo'},
'Gentoo': {'sudo': 'app-admin/sudo'}, 'Gentoo': {'pkg': 'app-admin/sudo'},
'Mint': {'sudo': 'sudo'}, 'Mint': {'pkg': 'sudo'},
'FreeBSD': {'sudo': 'sudo', 'Arch': {'pkg': 'sudo'},
'FreeBSD': {'pkg': 'sudo',
'config-path': '/usr/local/etc', 'config-path': '/usr/local/etc',
'group': 'wheel'}, 'group': 'wheel'},
}, merge=salt['pillar.get']('sudoers:lookup')) %} }, merge=salt['pillar.get']('sudoers:lookup')) %}