summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-master/private/set_network_facts.yml
diff options
context:
space:
mode:
authorRussell Teague <rteague@redhat.com>2017-11-16 14:18:58 -0500
committerRussell Teague <rteague@redhat.com>2017-11-22 08:32:57 -0500
commit78f11c8f671015d40a630208b548d0790ec3a823 (patch)
tree59dc57f13d23edc34d86c76aaf3f758a2fec9718 /playbooks/openshift-master/private/set_network_facts.yml
parent16e4acfe143e954c07c774c5c163fbd4ff1e4647 (diff)
downloadopenshift-78f11c8f671015d40a630208b548d0790ec3a823.tar.gz
openshift-78f11c8f671015d40a630208b548d0790ec3a823.tar.bz2
openshift-78f11c8f671015d40a630208b548d0790ec3a823.tar.xz
openshift-78f11c8f671015d40a630208b548d0790ec3a823.zip
Playbook Consolidation - openshift-master
Diffstat (limited to 'playbooks/openshift-master/private/set_network_facts.yml')
-rw-r--r--playbooks/openshift-master/private/set_network_facts.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/playbooks/openshift-master/private/set_network_facts.yml b/playbooks/openshift-master/private/set_network_facts.yml
new file mode 100644
index 000000000..9a6cf26fc
--- /dev/null
+++ b/playbooks/openshift-master/private/set_network_facts.yml
@@ -0,0 +1,34 @@
+---
+- name: Read first master\'s config
+ hosts: oo_first_master
+ gather_facts: no
+ tasks:
+ - stat:
+ path: "{{ openshift.common.config_base }}/master/master-config.yaml"
+ register: g_master_config_stat
+ - slurp:
+ src: "{{ openshift.common.config_base }}/master/master-config.yaml"
+ register: g_master_config_slurp
+
+- name: Set network facts for masters
+ hosts: oo_masters_to_config
+ gather_facts: no
+ roles:
+ - role: openshift_facts
+ post_tasks:
+ - block:
+ - set_fact:
+ osm_cluster_network_cidr: "{{ (hostvars[groups.oo_first_master.0].g_master_config_slurp.content|b64decode|from_yaml).networkConfig.clusterNetworkCIDR }}"
+ when: osm_cluster_network_cidr is not defined
+ - set_fact:
+ osm_host_subnet_length: "{{ (hostvars[groups.oo_first_master.0].g_master_config_slurp.content|b64decode|from_yaml).networkConfig.hostSubnetLength }}"
+ when: osm_host_subnet_length is not defined
+ - set_fact:
+ openshift_portal_net: "{{ (hostvars[groups.oo_first_master.0].g_master_config_slurp.content|b64decode|from_yaml).networkConfig.serviceNetworkCIDR }}"
+ when: openshift_portal_net is not defined
+ - openshift_facts:
+ role: common
+ local_facts:
+ portal_net: "{{ openshift_portal_net | default(openshift_master_portal_net) | default(None) }}"
+ when:
+ - hostvars[groups.oo_first_master.0].g_master_config_stat.stat.exists | bool