Add sshd_config to map.jinja and check if dig command is available before installing 'dig' package.

This commit is contained in:
Simon Lloyd committed 2016-04-19 02:53:14 +02:00
1 parent a85c19c256
commit daed52de19
4 files changed
+35 -4

No files matched your search

+25 -2
View File
@@ -19,7 +19,7 @@ that differ from whats in defaults.yaml
'FreeBSD': {
'service': 'sshd',
'dig_pkg': 'bind-tools',
'Subsystem': 'sftp /usr/libexec/sftp-server',
'root_group': 'wheel',
},
'Gentoo': {
'server': 'net-misc/openssh',
@@ -38,7 +38,6 @@ that differ from whats in defaults.yaml
'client': 'openssh',
'service': 'sshd',
'dig_pkg': 'bind-utils',
'Subsystem': 'sftp /usr/lib/ssh/sftp-server',
},
}
, grain="os_family"
@@ -56,3 +55,27 @@ that differ from whats in defaults.yaml
)
%}
{% set os_family_map = salt['grains.filter_by']({
'FreeBSD': {
'Subsystem': 'sftp /usr/libexec/sftp-server',
},
'Suse': {
'Subsystem': 'sftp /usr/lib/ssh/sftp-server',
},
'default': {}
}
, grain="os_family"
, merge=salt['pillar.get']('sshd_config:lookup'))
%}
{## Merge the flavor_map to the default settings ##}
{% do default_settings.sshd_config.update(os_family_map) %}
{## Merge in sshd_config:lookup pillar ##}
{% set sshd_config = salt['pillar.get'](
'sshd_config',
default=default_settings.sshd_config,
merge=True
)
%}