From 806d56e97dd2f0a50530627278906c56a073812b Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Tue, 26 May 2015 13:21:16 +0200 Subject: [PATCH] Add os_client_config_cloud parameter to infra_config.yml Instead of hardcoding to a known clouds.yaml cloud name, allow it to be configurable. --- infra_config.yml.sample | 1 + roles/provision_infra_servers/tasks/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/infra_config.yml.sample b/infra_config.yml.sample index ca9d553..4c9abfc 100644 --- a/infra_config.yml.sample +++ b/infra_config.yml.sample @@ -1,4 +1,5 @@ --- +os_client_config_cloud: envvars system_config_repo_url: git@your_git_server/system-config.git key_name: your_openstack_key domainname: yourdomain diff --git a/roles/provision_infra_servers/tasks/main.yml b/roles/provision_infra_servers/tasks/main.yml index 432254c..b91f9d7 100644 --- a/roles/provision_infra_servers/tasks/main.yml +++ b/roles/provision_infra_servers/tasks/main.yml @@ -2,8 +2,8 @@ - name: Create OpenStack instances os_server: state: present - cloud: openstack - name: "{{ item.name }}" + cloud: "{{os_client_config_cloud}}" + name: "{{ item.name }}.{{ domainname }}" region_name: region-b.geo-1 availability_zone: az2 image: "{{ item.image }}"