summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-01-10 01:13:52 -0500
committerJason DeTiberus <jdetiber@redhat.com>2016-01-19 15:34:48 -0500
commitb4b50a09b183297dfe79110a778c4daadd73129e (patch)
tree0fd7b0174945401ac25889b2765eb3227f51976c /playbooks/openstack
parent8ce35b40a55f46f716f280054594c8b5d39cd547 (diff)
downloadopenshift-b4b50a09b183297dfe79110a778c4daadd73129e.tar.gz
openshift-b4b50a09b183297dfe79110a778c4daadd73129e.tar.bz2
openshift-b4b50a09b183297dfe79110a778c4daadd73129e.tar.xz
openshift-b4b50a09b183297dfe79110a778c4daadd73129e.zip
Update cluster_hosts.yml for cloud providers
- Add g_infra_hosts (nodes with sub-type infra) - Add g_compute_hosts (nodes with sub-type compute) - Reduce duplication by re-using previously defined variables
Diffstat (limited to 'playbooks/openstack')
-rw-r--r--playbooks/openstack/openshift-cluster/cluster_hosts.yml27
1 files changed, 11 insertions, 16 deletions
diff --git a/playbooks/openstack/openshift-cluster/cluster_hosts.yml b/playbooks/openstack/openshift-cluster/cluster_hosts.yml
index bc586d983..1023f3ec1 100644
--- a/playbooks/openstack/openshift-cluster/cluster_hosts.yml
+++ b/playbooks/openstack/openshift-cluster/cluster_hosts.yml
@@ -1,22 +1,17 @@
---
-g_etcd_hosts: "{{ (groups['tag_host-type_etcd']|default([]))
- | intersect((groups['tag_clusterid_' ~ cluster_id]|default([])))
- | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}"
+g_all_hosts: "{{ groups['tag_clusterid_' ~ cluster_id] | default([])
+ | intersect(groups['tag_environment_' ~ cluster_env] | default([])) }}"
-g_lb_hosts: "{{ (groups['tag_host-type_lb']|default([]))
- | intersect((groups['tag_clusterid_' ~ cluster_id]|default([])))
- | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}"
+g_etcd_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_etcd'] | default([])) }}"
-g_master_hosts: "{{ (groups['tag_host-type_master']|default([]))
- | intersect((groups['tag_clusterid_' ~ cluster_id]|default([])))
- | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}"
+g_lb_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_lb'] | default([])) }}"
-g_node_hosts: "{{ (groups['tag_host-type_node']|default([]))
- | intersect((groups['tag_clusterid_' ~ cluster_id]|default([])))
- | intersect((groups['tag_environment_' ~ cluster_env]|default([]))) }}"
+g_nfs_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_nfs'] | default([])) }}"
-g_nfs_hosts: "{{ (groups['tag_host-type_nfs']|default([]))
- | intersect((groups['tag_environment_' ~ cluster_id]|default([]))) }}"
+g_master_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_master'] | default([])) }}"
-g_all_hosts: "{{ g_master_hosts | union(g_node_hosts) | union(g_etcd_hosts)
- | union(g_lb_hosts) | default([]) }}"
+g_node_hosts: "{{ g_all_hosts | intersect(groups['tag_host-type_node'] | default([])) }}"
+
+g_infra_hosts: "{{ g_node_hosts | intersect(groups['tag_sub-host-type_infra']) | default([]) }}"
+
+g_compute_hosts: "{{ g_node_hosts | intersect(groups['tag_sub-host-type_compute']) | default([]) }}"