2019-06-25 06:31:34 +02:00
|
|
|
{% set tplroot = tpldir.split('/')[0] %}
|
|
|
|
{% from tplroot ~ "/map.jinja" import openssh with context %}
|
|
|
|
{% from tplroot ~ "/libtofs.jinja" import files_switch %}
|
2015-03-26 17:50:32 +01:00
|
|
|
|
|
|
|
ensure dig is available:
|
|
|
|
pkg.installed:
|
|
|
|
- name: {{ openssh.dig_pkg }}
|
2016-07-19 22:23:48 +02:00
|
|
|
- unless: which dig
|
2015-03-26 17:50:32 +01:00
|
|
|
|
|
|
|
manage ssh_known_hosts file:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ openssh.ssh_known_hosts }}
|
2019-06-25 06:31:34 +02:00
|
|
|
- source: {{ files_switch( ['ssh_known_hosts'],
|
|
|
|
'ssh_known_hosts_file_managed'
|
|
|
|
) }}
|
2015-03-26 17:50:32 +01:00
|
|
|
- template: jinja
|
|
|
|
- user: root
|
2017-03-04 14:19:52 +01:00
|
|
|
- group: {{ openssh.ssh_config_group }}
|
2015-03-26 17:50:32 +01:00
|
|
|
- mode: 644
|
|
|
|
- require:
|
|
|
|
- pkg: ensure dig is available
|