From 675ceea37c5e439a6b16311ae4e973d26907407c Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Tue, 15 Aug 2017 16:19:05 +0000 Subject: [PATCH] Give cloud boxes an ssh cert Signed-off-by: Patrick Uiterwijk --- tasks/persistent_cloud.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/tasks/persistent_cloud.yml b/tasks/persistent_cloud.yml index 11a16dcdf0..7dd43671b2 100644 --- a/tasks/persistent_cloud.yml +++ b/tasks/persistent_cloud.yml @@ -7,22 +7,6 @@ changed_when: false check_mode: no -- name: clean out old known_hosts (name based entries) - local_action: known_hosts path={{item}} host={{inventory_hostname}} state=absent - ignore_errors: True - with_items: - - /root/.ssh/known_hosts - - /etc/ssh/ssh_known_hosts - when: host_is_up|failed - -- name: clean out old known_hosts (IP based entries) - local_action: known_hosts path={{item}} host={{ lookup('dig', inventory_hostname, wantlist=False) }} state=absent - ignore_errors: True - with_items: - - /root/.ssh/known_hosts - - /etc/ssh/ssh_known_hosts - when: host_is_up|failed - - name: spin UP VM using nova_compute become: False local_action: @@ -44,6 +28,9 @@ register: nova_result when: host_is_up|failed +- name: Put in SSH cert + include: "{{ ansible }}/roles/base/tasks/sshcerts.yml" + # instance can be both id and name, volume must be id # volume must be id #