From a5a6a3238bd2d289d1dbb47d10d1878e9acaf7ca Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 13 Sep 2017 19:26:35 +0000 Subject: [PATCH] ssh st key konfiguration --- tasks/main.yml | 7 +++---- tasks/save.yml | 6 +----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 66d3c7d..d160a68 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,8 +2,8 @@ - include: scan.yml when: - ssh_host_key_state is defined and - ssh_host_key_state == 'scanned' + ssh_host_key_state is defined + and ssh_host_key_state == 'scanned' - include: setup.yml when: @@ -12,7 +12,6 @@ - include: fetch.yml when: - not ssh_host_key_state is defined or - ssh_host_key_state == 'fetched' + not ssh_host_key_state is defined - include: save.yml diff --git a/tasks/save.yml b/tasks/save.yml index 9d75290..33f4814 100644 --- a/tasks/save.yml +++ b/tasks/save.yml @@ -10,9 +10,5 @@ local_action: known_hosts args: path: "{{ playbook_dir }}/ssh_known_hosts" - name: '{{ inventory_hostname }}' + name: "{{ inventory_hostname }}" key: "{{ inventory_hostname }},{{ ssh_ip }} {{ _ssh_key_type[ssh_host_key_type] }} {{ _ssh_host_key[ssh_host_key_type] }}" - when: - not ssh_host_key_state is defined or - ssh_host_key_state == 'configured' or - ssh_host_key_state == 'scanned'