From 972c6512952ff78313045ed6518591eab8dd607a Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 14 May 2017 04:36:36 +0000 Subject: [PATCH] fix up virt instance create autostart --- tasks/virt_instance_create.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml index d8413c856f..5e3e886561 100644 --- a/tasks/virt_instance_create.yml +++ b/tasks/virt_instance_create.yml @@ -65,8 +65,8 @@ tags: - armv7-kernel -- name: start the vm up - virt: state=running name={{ inventory_hostname }} +- name: start the vm up and set it to autostart + virt: state=running name={{ inventory_hostname }} autostart=True delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms @@ -76,11 +76,6 @@ tags: - armv7-kernel -- name: set it to autostart - virt: autostart=True name={{ inventory_hostname }} - delegate_to: "{{ vmhost }}" - when: inventory_hostname not in result.list_vms - - name: make sure there is no old ssh host key for the host still around local_action: known_hosts path={{item}} host={{ inventory_hostname }} state=absent ignore_errors: True