0
0
mirror of https://github.com/saltstack-formulas/openssh-formula.git synced 2024-12-01 02:31:19 +01:00
openssh-formula/openssh/map.jinja

58 lines
1.4 KiB
Plaintext
Raw Normal View History

{## Start with defaults from defaults.yaml ##}
{% import_yaml "openssh/defaults.yaml" as default_settings %}
{##
Setup variable using grains['os_family'] based logic, only add key:values here
that differ from whats in defaults.yaml
##}
{% set os_family_map = salt['grains.filter_by']({
2015-03-23 14:55:40 +01:00
'Arch': {
'server': 'openssh',
'client': 'openssh',
2015-06-07 15:03:22 +02:00
'service': 'sshd',
},
2015-03-23 14:55:40 +01:00
'Debian': {
'server': 'openssh-server',
'client': 'openssh-client',
'service': 'ssh',
},
2015-03-23 14:55:40 +01:00
'FreeBSD': {
'service': 'sshd',
'dig_pkg': 'bind-tools',
'Subsystem': 'sftp /usr/libexec/sftp-server',
2015-03-23 14:55:40 +01:00
},
2015-03-23 14:56:12 +01:00
'Gentoo': {
'server': 'net-misc/openssh',
'client': 'net-misc/openssh',
'service': 'sshd',
'dig_pkg': 'net-dns/bind-tools',
2015-03-23 14:56:12 +01:00
},
2015-03-23 14:55:40 +01:00
'RedHat': {
'server': 'openssh-server',
'client': 'openssh',
'service': 'sshd',
'dig_pkg': 'bind-utils',
},
2015-03-23 14:55:40 +01:00
'Suse': {
'server': 'openssh',
'client': 'openssh',
'service': 'sshd',
'dig_pkg': 'bind-utils',
},
}
, grain="os_family"
, merge=salt['pillar.get']('openssh:lookup'))
%}
{## Merge the flavor_map to the default settings ##}
{% do default_settings.openssh.update(os_family_map) %}
{## Merge in openssh:lookup pillar ##}
{% set openssh = salt['pillar.get'](
'openssh',
default=default_settings.openssh,
merge=True
)
%}