From 3cd465e75900a7a278b4cec46a73a01dc986d0ba Mon Sep 17 00:00:00 2001 From: Valentin Gologuzov Date: Mon, 16 Mar 2015 14:54:24 +0100 Subject: [PATCH] auth for nova cli --- tasks/persistent_cloud_new.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/persistent_cloud_new.yml b/tasks/persistent_cloud_new.yml index dde34d0b81..c21598dfad 100644 --- a/tasks/persistent_cloud_new.yml +++ b/tasks/persistent_cloud_new.yml @@ -13,11 +13,13 @@ # To use direct `nova` commands construct _OS_AUTH_OPTS as: # --os-auth-url {{OS_AUTH_URL}} --os-username {{OS_USERNAME}} --os-password {{OS_PASSWORD}} --os-tenant-name {{OS_TENANT_NAME}} --os-tenant-id {{OS_TENANT_ID}} - name: "get current VM status" - local_action: "shell nova --insecure {{_OS_AUTH_OPTS}} show {{inventory_hostname}} 2>/dev/null | grep status | cut -d'|' -f3 | cut -d' ' -f2" + # local_action: "shell nova --insecure {{_OS_AUTH_OPTS}} show {{inventory_hostname}} 2>/dev/null | grep status | cut -d'|' -f3 | cut -d' ' -f2" + local_action: "shell nova --insecure --os-auth-url {{OS_AUTH_URL}} --os-username {{OS_USERNAME}} --os-password {{OS_PASSWORD}} --os-tenant-name {{OS_TENANT_NAME}} --os-tenant-id {{OS_TENANT_ID}} show {{inventory_hostname}} 2>/dev/null | grep status | cut -d'|' -f3 | cut -d' ' -f2" register: vm_status - name: "spinup VM without novaclient, need to set key-pair and floating ip later" - local_action: "shell nova --insecure {{_OS_AUTH_OPTS}} boot --flavor {{flavor_id}} --image {{image}} --poll {{inventory_hostname}}" + # local_action: "shell nova --insecure {{_OS_AUTH_OPTS}} boot --flavor {{flavor_id}} --image {{image}} --poll {{inventory_hostname}}" + local_action: "shell nova --insecure --os-auth-url {{OS_AUTH_URL}} --os-username {{OS_USERNAME}} --os-password {{OS_PASSWORD}} --os-tenant-name {{OS_TENANT_NAME}} --os-tenant-id {{OS_TENANT_ID}} boot --flavor {{flavor_id}} --image {{image}} --poll {{inventory_hostname}}" when: vm_status.stdout != "ACTIVE"