From b5f00c416b767b167bbd3d8f61f2b9a534aa5432 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Mon, 16 Nov 2015 17:24:43 +0100 Subject: Add support for Openstack integration --- roles/openshift_cloud_provider/tasks/main.yml | 3 +++ roles/openshift_cloud_provider/tasks/openstack.yml | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 roles/openshift_cloud_provider/tasks/main.yml create mode 100644 roles/openshift_cloud_provider/tasks/openstack.yml (limited to 'roles/openshift_cloud_provider/tasks') diff --git a/roles/openshift_cloud_provider/tasks/main.yml b/roles/openshift_cloud_provider/tasks/main.yml new file mode 100644 index 000000000..e14f944e8 --- /dev/null +++ b/roles/openshift_cloud_provider/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- include: openstack.yml + when: "openshift_cloud_provider is defined and openshift_cloud_provider == 'openstack' and 'provider' in openshift and openshift.provider.name == 'openstack'" diff --git a/roles/openshift_cloud_provider/tasks/openstack.yml b/roles/openshift_cloud_provider/tasks/openstack.yml new file mode 100644 index 000000000..a56f1891a --- /dev/null +++ b/roles/openshift_cloud_provider/tasks/openstack.yml @@ -0,0 +1,9 @@ +- fail: + msg: "The Openstack integration requires OpenShift Enterprise 3.2 or Origin 1.2." + when: not openshift.common.version_gte_3_2_or_1_2 | bool + +- name: Create /etc/cloud.conf + template: + dest: /etc/cloud.conf + src: openstack/cloud.conf.j2 + when: ocp_os_auth_url and ocp_os_username and ocp_os_password and (ocp_os_tenant_id or ocp_os_tenant_name) \ No newline at end of file -- cgit v1.2.1