From 2123ca949c51bf8dc8f10ba7d2e19f9e11c29845 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 7 Jul 2014 16:41:09 +0000 Subject: [PATCH] Make virt-instance-create more clear on where it's doing things. --- tasks/virt_instance_create.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml index 2eb06d4c77..95830108e5 100644 --- a/tasks/virt_instance_create.yml +++ b/tasks/virt_instance_create.yml @@ -2,23 +2,23 @@ # FIXME # do an action here that aborts if a bunch of vars are not set -- name: get vm list on the vmhost +- name: get vm list on {{ vmhost }} delegate_to: "{{ vmhost }}" virt: command=list_vms register: result always_run: yes -- name: ensure the lv for the host is made +- name: ensure the lv for the guest is made on {{ vmhost }} lvol: lv={{ inventory_hostname }} vg={{ volgroup }} size={{ lvm_size }} state=present delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms -- name: run the virt-install +- name: run the virt-install on {{ vmhost }} shell: "{{ virt_install_command }}" delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms -- name: wait for the install to finish +- name: wait for the install to finish on {{ vmhost }} virt: command=status name={{ inventory_hostname }} register: vmstatus until: vmstatus.status == 'shutdown' @@ -27,12 +27,12 @@ delay: 10 when: inventory_hostname not in result.list_vms -- name: start the vm up +- name: start the vm up on {{ vmhost }} action: virt state=running name={{ inventory_hostname }} delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms -- name: set it to autostart +- name: set it to autostart on {{ vmhost }} action: virt command=autostart name={{ inventory_hostname }} delegate_to: "{{ vmhost }}" when: inventory_hostname not in result.list_vms