f6dbca3352
* Use consistent Jinja whitespace control `{%- ... -}` * Improve debug output (comments & whitespace control) * Use exact state names with TOFS `files_switch` * Add `ssh_known_hosts_src` to `defaults` (for consistency) * Restrict `pillar.example` changes to TOFS only * Use `fire_banner` in `pillar.example` to indicate available template
22 lines
646 B
Plaintext
22 lines
646 B
Plaintext
{%- set tplroot = tpldir.split('/')[0] %}
|
|
{%- from tplroot ~ "/map.jinja" import openssh with context %}
|
|
{%- from tplroot ~ "/libtofs.jinja" import files_switch %}
|
|
|
|
ensure dig is available:
|
|
pkg.installed:
|
|
- name: {{ openssh.dig_pkg }}
|
|
- unless: which dig
|
|
|
|
manage ssh_known_hosts file:
|
|
file.managed:
|
|
- name: {{ openssh.ssh_known_hosts }}
|
|
- source: {{ files_switch( [openssh.ssh_known_hosts_src],
|
|
'manage ssh_known_hosts file'
|
|
) }}
|
|
- template: jinja
|
|
- user: root
|
|
- group: {{ openssh.ssh_config_group }}
|
|
- mode: 644
|
|
- require:
|
|
- pkg: ensure dig is available
|