summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cloud_provider
diff options
context:
space:
mode:
authorSeth Jennings <sjenning@redhat.com>2016-11-04 11:01:14 -0500
committerSeth Jennings <sjenning@redhat.com>2016-11-04 15:32:56 -0500
commit2659a4f891d22dd820bd30f8d3b1dbd8793abb7a (patch)
tree905406cfa7202c0379c3f7d9f3586af3f9252c32 /roles/openshift_cloud_provider
parent35db78f391f41e962903dbe9174efc7052948a15 (diff)
downloadopenshift-2659a4f891d22dd820bd30f8d3b1dbd8793abb7a.tar.gz
openshift-2659a4f891d22dd820bd30f8d3b1dbd8793abb7a.tar.bz2
openshift-2659a4f891d22dd820bd30f8d3b1dbd8793abb7a.tar.xz
openshift-2659a4f891d22dd820bd30f8d3b1dbd8793abb7a.zip
default to multizone GCE config
Diffstat (limited to 'roles/openshift_cloud_provider')
-rw-r--r--roles/openshift_cloud_provider/tasks/gce.yml16
-rw-r--r--roles/openshift_cloud_provider/tasks/main.yml3
-rw-r--r--roles/openshift_cloud_provider/vars/main.yml1
3 files changed, 20 insertions, 0 deletions
diff --git a/roles/openshift_cloud_provider/tasks/gce.yml b/roles/openshift_cloud_provider/tasks/gce.yml
new file mode 100644
index 000000000..14ad8ba94
--- /dev/null
+++ b/roles/openshift_cloud_provider/tasks/gce.yml
@@ -0,0 +1,16 @@
+# Work around ini_file create option in 2.2 which defaults to no
+- name: Create cloud config file
+ file:
+ dest: "{{ openshift.common.config_base }}/cloudprovider/gce.conf"
+ state: touch
+ mode: 0660
+ owner: root
+ group: root
+ changed_when: false
+
+- name: Configure GCE cloud provider
+ ini_file:
+ dest: "{{ openshift.common.config_base }}/cloudprovider/gce.conf"
+ section: Global
+ option: multizone
+ value: "true"
diff --git a/roles/openshift_cloud_provider/tasks/main.yml b/roles/openshift_cloud_provider/tasks/main.yml
index e217e37ea..ab3055c8b 100644
--- a/roles/openshift_cloud_provider/tasks/main.yml
+++ b/roles/openshift_cloud_provider/tasks/main.yml
@@ -16,3 +16,6 @@
- include: aws.yml
when: cloudprovider_is_aws | bool
+
+- include: gce.yml
+ when: cloudprovider_is_gce | bool
diff --git a/roles/openshift_cloud_provider/vars/main.yml b/roles/openshift_cloud_provider/vars/main.yml
index 83bf6edc8..c9d953f58 100644
--- a/roles/openshift_cloud_provider/vars/main.yml
+++ b/roles/openshift_cloud_provider/vars/main.yml
@@ -2,3 +2,4 @@
has_cloudprovider: "{{ openshift_cloudprovider_kind | default(None) != None }}"
cloudprovider_is_aws: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'aws' }}"
cloudprovider_is_openstack: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'openstack' }}"
+cloudprovider_is_gce: "{{ has_cloudprovider | bool and openshift_cloudprovider_kind == 'gce' }}"