From 293e823e49f8b9457a0d49edd83962e341fb7f5e Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 25 May 2017 00:03:09 +0000 Subject: [PATCH] current --- tasks/main.yml | 2 +- tasks/scan.yml | 2 +- tasks/setup.yml | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index c7b4e83..c703198 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,7 +23,7 @@ args: path: 'ssh_known_hosts' name: '{{ inventory_hostname }}' - key: "{{ inventory_hostname }} {{ _ssh_key_type[ssh_host_key_type] }} {{ _ssh_host_key[ssh_host_key_type] }}" + key: "{{ inventory_hostname }},{{ ansible_host }} {{ _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 diff --git a/tasks/scan.yml b/tasks/scan.yml index 3e91bf7..7b92da4 100644 --- a/tasks/scan.yml +++ b/tasks/scan.yml @@ -1,7 +1,7 @@ --- - name: scan ssh host - local_action: command ssh-keyscan -t {{ssh_host_key_type}} {{inventory_hostname}} + local_action: command ssh-keyscan -t {{ssh_host_key_type}} {{ansible_host}} register: _ssh_keyscan_result changed_when: false diff --git a/tasks/setup.yml b/tasks/setup.yml index ecda9b3..1857ef2 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -1,8 +1,5 @@ --- -- setup: - gather_subset: '!all' - - name: set ssh_host_key_ed25519_public set_fact: ssh_host_key_ed25519_public: "{{ ansible_ssh_host_key_ed25519_public }}"