users-formula/users/map.jinja

62 lines
1.7 KiB
Plaintext
Raw Normal View History

2015-07-27 19:45:56 +02:00
# -*- coding: utf-8 -*-
# vim: ft=jinja
{##
This map.jinja pulls in
- os flavor related decisions
- merges in users pillar
##}
{% set os_settingss = salt['grains.filter_by']({
'Debian': {
2014-10-25 04:57:44 +02:00
'sudoers_dir': '/etc/sudoers.d',
'sudoers_file': '/etc/sudoers',
'googleauth_dir': '/etc/google_authenticator.d',
'root_group': 'root',
'shell': '/bin/bash',
'visudo_shell': '/bin/bash',
'bash_package': 'bash',
'sudo_package': 'sudo',
'googleauth_package': 'libpam-google-authenticator',
},
2014-05-31 13:15:03 +02:00
'Gentoo': {
2014-10-25 04:57:44 +02:00
'sudoers_dir': '/etc/sudoers.d',
2014-05-31 13:15:03 +02:00
'sudoers_file': '/etc/sudoers',
'googleauth_dir': '/etc/google_authenticator.d',
2014-05-31 13:15:03 +02:00
'root_group': 'root',
'shell': '/bin/bash',
2014-05-31 13:15:03 +02:00
'visudo_shell': '/bin/bash',
'bash_package': 'app-shells/bash',
'sudo_package': 'app-admin/sudo',
'googleauth_package': 'libpam-google-authenticator',
2014-05-31 13:15:03 +02:00
},
'FreeBSD': {
2014-10-25 04:57:44 +02:00
'sudoers_dir': '/usr/local/etc/sudoers.d',
'sudoers_file': '/usr/local/etc/sudoers',
'googleauth_dir': '/usr/local/etc/google_authenticator.d',
'root_group': 'wheel',
'shell': '/bin/csh',
'visudo_shell': '/usr/local/bin/bash',
'bash_package': 'bash',
'sudo_package': 'sudo',
'googleauth_package': 'pam_google_authenticator',
},
'default': {
2014-10-25 04:57:44 +02:00
'sudoers_dir': '/etc/sudoers.d',
'sudoers_file': '/etc/sudoers',
'googleauth_dir': '/etc/google_authenticator.d',
'root_group': 'root',
'shell': '/bin/bash',
'visudo_shell': '/bin/bash',
'bash_package': 'bash',
'sudo_package': 'sudo',
'googleauth_package': 'libpam-google-authenticator',
},
2015-07-27 19:45:56 +02:00
}, merge=salt['pillar.get']('users:lookup'))
%}
{%
set users_settings = salt['pillar.get'](
'users',
default=os_settings,
merge=True)
%}