mirror of
https://github.com/saltstack-formulas/openssh-formula.git
synced 2026-10-24 01:24:57 +02:00
feat(templates): don't get openssh pillars in templates
We pass the pillars via the template engine context, this avoid the need to load `map.jinja` from the templates themselves and recude the number of `pillar.get` calls. * openssh/config.sls (sshd_config): pass `sshd_config` in the context. (ssh_config): pass `ssh_config` in the context. * openssh/files/default/ssh_config: remove `map.jinja` import since it's now in the context. * openssh/files/default/sshd_config: ditoo. * openssh/known_hosts.sls: pass `known_hosts` in the context. * openssh/files/default/ssh_known_hosts: use `known_hosts` from the context instead of calling `pillar.get` several times. BREAKING CHANGE: Minimum Salt version support is now `2019.2` in line with official upstream support; also use of the `traverse` Jinja filter.
This commit is contained in:
1 parent
24049f3aab
commit
cb6e48feaa
5 files changed
+21
-23
No files matched your search
@@ -14,6 +14,8 @@ manage ssh_known_hosts file:
|
||||
'manage ssh_known_hosts file'
|
||||
) }}
|
||||
- template: jinja
|
||||
- context:
|
||||
known_hosts: {{ openssh | traverse("known_hosts", {}) }}
|
||||
- user: root
|
||||
- group: {{ openssh.ssh_config_group }}
|
||||
- mode: 644
|
||||
|
||||
Reference in new issue
Block a user