Fix problem with token.stdout
diff --git a/xos/openstack_observer/steps/sync_controller_images.yaml b/xos/openstack_observer/steps/sync_controller_images.yaml
index 2d2cf68..195e5e7 100644
--- a/xos/openstack_observer/steps/sync_controller_images.yaml
+++ b/xos/openstack_observer/steps/sync_controller_images.yaml
@@ -1,14 +1,14 @@
---
- hosts: 127.0.0.1
- connection: local
+ connection: local
tasks:
- shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT=admin DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
register: token
- glance_image:
- auth_url: {{ endpoint }}
- token: {{ token.stdout }}
- name: "{{ name }}"
- file: "{{ filepath }}"
- disk_format: 'raw'
- is_public: true
+ auth_url={{ endpoint }}
+ token={{ '{{' }} token.stdout {{ '}}' }}
+ name="{{ name }}"
+ file="{{ filepath }}"
+ disk_format='raw'
+ is_public=true
diff --git a/xos/openstack_observer/steps/sync_controller_networks.yaml b/xos/openstack_observer/steps/sync_controller_networks.yaml
index c1b7bcf..5d2a6eb 100644
--- a/xos/openstack_observer/steps/sync_controller_networks.yaml
+++ b/xos/openstack_observer/steps/sync_controller_networks.yaml
@@ -1,13 +1,13 @@
---
- hosts: 127.0.0.1
- connection: local
+ connection: local
tasks:
- shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{tenant_name}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
register: token
- quantum_network:
auth_url={{ endpoint }}
- token={{ token.stdout }}
+ token={{ '{{' }} token.stdout {{ '}}' }}
tenant_name={{ tenant_name }}
name={{ name }}
{% if delete %}
@@ -19,15 +19,15 @@
{% if not delete %}
- quantum_subnet:
auth_url={{ endpoint }}
- token={{ token.stdout }}
+ token={{ '{{' }} token.stdout {{ '}}' }}
tenant_name={{ tenant_name }}
- name={{ subnet_name }}
- network_name={{ name }}
+ name={{ subnet_name }}
+ network_name={{ name }}
{% if delete %}
state=absent
{% else %}
- state=present
- no_gateway=true
+ state=present
+ no_gateway=true
dns_nameservers=8.8.8.8
cidr={{ cidr }}
{% endif %}
diff --git a/xos/openstack_observer/steps/sync_controller_slices.yaml b/xos/openstack_observer/steps/sync_controller_slices.yaml
index 3c3208c..c006738 100644
--- a/xos/openstack_observer/steps/sync_controller_slices.yaml
+++ b/xos/openstack_observer/steps/sync_controller_slices.yaml
@@ -5,10 +5,10 @@
- shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
register: token
{% if delete -%}
- - keystone_user: endpoint={{ endpoint }} token={{ token.stdout }} tenant={{ tenant }} tenant_description="{{ tenant_description }}" state=absent
- {% else -%}
- - keystone_user: endpoint={{ endpoint }} token={{ token.stdout }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
+ - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} tenant={{ tenant }} tenant_description="{{ tenant_description }}" state=absent
+ {% else -%}
+ - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
{% for role in roles %}
- - keystone_user: endpoint={{ endpoint}} token={{ token.stdout }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
+ - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
{% endfor %}
- {% endif %}
+ {% endif %}
diff --git a/xos/openstack_observer/steps/sync_controller_users.yaml b/xos/openstack_observer/steps/sync_controller_users.yaml
index 752a037..1179f52 100644
--- a/xos/openstack_observer/steps/sync_controller_users.yaml
+++ b/xos/openstack_observer/steps/sync_controller_users.yaml
@@ -5,13 +5,13 @@
- shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
register: token
- - keystone_user:
- endpoint= {{ endpoint }}
- token= {{ token.stdout }}
- user="{{ name }}"
- email={{ email }}
- password={{ password }}
+ - keystone_user:
+ endpoint={{ endpoint }}
+ token={{ '{{' }} token.stdout {{ '}}' }}
+ user="{{ name }}"
+ email={{ email }}
+ password={{ password }}
tenant={{ tenant }}
{% for role in roles %}
- - keystone_user: endpoint= {{ endpoint}} token= {{ token.stdout }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
+ - keystone_user: endpoint={{ endpoint}} token={{ '{{' }} token.stdout {{ '}}' }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
{% endfor %}
diff --git a/xos/openstack_observer/steps/sync_instances.yaml b/xos/openstack_observer/steps/sync_instances.yaml
index 8eca494..4b20c9e 100644
--- a/xos/openstack_observer/steps/sync_instances.yaml
+++ b/xos/openstack_observer/steps/sync_instances.yaml
@@ -7,7 +7,7 @@
- nova_compute:
auth_url: {{ endpoint }}
- token: {{ token.stdout }}
+ token: {{ '{{' }} token.stdout {{ '}}' }}
name: {{ name }}
{% if delete -%}
state: absent