let os_* ansible modules work
diff --git a/containers/synchronizer/Dockerfile b/containers/synchronizer/Dockerfile
index 60cc48b..446bf84 100644
--- a/containers/synchronizer/Dockerfile
+++ b/containers/synchronizer/Dockerfile
@@ -12,6 +12,11 @@
software-properties-common \
supervisor
+# required for ansible 2.0 OpenStack os_* modules
+RUN pip install --upgrade pbr
+RUN pip install --upgrade six
+RUN pip install shade
+
# Install ansible from PPA
RUN add-apt-repository ppa:ansible/ansible
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
diff --git a/xos/synchronizers/base/run_ansible b/xos/synchronizers/base/run_ansible
index a504ec3..4e724fc 100755
--- a/xos/synchronizers/base/run_ansible
+++ b/xos/synchronizers/base/run_ansible
@@ -1,4 +1,3 @@
#!/bin/bash
-source /opt/ansible/hacking/env-setup >> /dev/null
ansible-playbook -v "$@"
diff --git a/xos/synchronizers/base/steps/sync_instances.yaml b/xos/synchronizers/base/steps/sync_instances.yaml
index da2ae55..70da32d 100644
--- a/xos/synchronizers/base/steps/sync_instances.yaml
+++ b/xos/synchronizers/base/steps/sync_instances.yaml
@@ -3,22 +3,21 @@
connection: local
tasks:
- os_server:
- auth_type: password
+ name: {{ name }}
auth:
auth_url: {{ endpoint }}
username: {{ admin_user }}
password: {{ admin_password }}
- project_name: {{ admin_tenant }}
- name: {{ name }}
+ project_name: {{ project_name }}
{% if delete -%}
state: absent
{% else -%}
state: present
- availability_zone: {{ availability_zone }}
+ availability_zone: "{{ availability_zone }}"
image: {{ image_name }}
flavor: {{ flavor_name }}
timeout: 200
- user_data: "{{ user_data }}"
+ userdata: "{{ user_data }}"
config_drive: yes
nics:
{% for nic in nics %}
@@ -32,3 +31,4 @@
{% endfor %}
{% endif %}
{% endif %}
+
diff --git a/xos/synchronizers/openstack/steps/sync_controller_networks.yaml b/xos/synchronizers/openstack/steps/sync_controller_networks.yaml
index b885516..eeab6d1 100644
--- a/xos/synchronizers/openstack/steps/sync_controller_networks.yaml
+++ b/xos/synchronizers/openstack/steps/sync_controller_networks.yaml
@@ -31,7 +31,7 @@
{% if use_vtn %}
gateway_ip={{ gateway }}
{% else %}
- no_gateway=true
+ gateway_ip="None"
{% endif %}
dns_nameservers=8.8.8.8
cidr={{ cidr }}
diff --git a/xos/synchronizers/openstack/steps/sync_instances.py b/xos/synchronizers/openstack/steps/sync_instances.py
index 3a1bc52..e1561b5 100644
--- a/xos/synchronizers/openstack/steps/sync_instances.py
+++ b/xos/synchronizers/openstack/steps/sync_instances.py
@@ -168,7 +168,7 @@
'domain': controller.domain,
'admin_user': instance.creator.email,
'admin_password': instance.creator.remote_password,
- 'admin_tenant': instance.slice.name,
+ 'project_name': instance.slice.login_base,
'tenant': instance.slice.name,
'tenant_description': instance.slice.description,
'name':instance_name,
diff --git a/xos/synchronizers/openstack/steps/sync_instances.yaml b/xos/synchronizers/openstack/steps/sync_instances.yaml
index da2ae55..70da32d 100644
--- a/xos/synchronizers/openstack/steps/sync_instances.yaml
+++ b/xos/synchronizers/openstack/steps/sync_instances.yaml
@@ -3,22 +3,21 @@
connection: local
tasks:
- os_server:
- auth_type: password
+ name: {{ name }}
auth:
auth_url: {{ endpoint }}
username: {{ admin_user }}
password: {{ admin_password }}
- project_name: {{ admin_tenant }}
- name: {{ name }}
+ project_name: {{ project_name }}
{% if delete -%}
state: absent
{% else -%}
state: present
- availability_zone: {{ availability_zone }}
+ availability_zone: "{{ availability_zone }}"
image: {{ image_name }}
flavor: {{ flavor_name }}
timeout: 200
- user_data: "{{ user_data }}"
+ userdata: "{{ user_data }}"
config_drive: yes
nics:
{% for nic in nics %}
@@ -32,3 +31,4 @@
{% endfor %}
{% endif %}
{% endif %}
+