summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-01-21 11:52:18 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-01-21 11:52:18 -0500
commitc6e6a4bfb359add31c3677df18d5f92220d25a68 (patch)
tree6b75cce5d209506bd3a19fd4a10c25c489706ba9 /playbooks
parent4e04c87d7f47460eb590c1fb208bc2c19186a10f (diff)
parentb4b50a09b183297dfe79110a778c4daadd73129e (diff)
downloadopenshift-c6e6a4bfb359add31c3677df18d5f92220d25a68.tar.gz
openshift-c6e6a4bfb359add31c3677df18d5f92220d25a68.tar.bz2
openshift-c6e6a4bfb359add31c3677df18d5f92220d25a68.tar.xz
openshift-c6e6a4bfb359add31c3677df18d5f92220d25a68.zip
Merge pull request #1235 from detiber/cluster_hosts
Update cluster_hosts.yml for cloud providers
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/aws/openshift-cluster/cluster_hosts.yml27
-rw-r--r--playbooks/gce/openshift-cluster/cluster_hosts.yml27
-rw-r--r--playbooks/libvirt/openshift-cluster/cluster_hosts.yml27
-rw-r--r--playbooks/openstack/openshift-cluster/cluster_hosts.yml27
4 files changed, 44 insertions, 64 deletions
diff --git a/playbooks/aws/openshift-cluster/cluster_hosts.yml b/playbooks/aws/openshift-cluster/cluster_hosts.yml
index d6b413c6f..1023f3ec1 100644
--- a/playbooks/aws/openshift-cluster/cluster_hosts.yml
+++ b/playbooks/aws/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([]) }}"
diff --git a/playbooks/gce/openshift-cluster/cluster_hosts.yml b/playbooks/gce/openshift-cluster/cluster_hosts.yml
index 2bfcedfc9..15690e3bf 100644
--- a/playbooks/gce/openshift-cluster/cluster_hosts.yml
+++ b/playbooks/gce/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([]) }}"
diff --git a/playbooks/libvirt/openshift-cluster/cluster_hosts.yml b/playbooks/libvirt/openshift-cluster/cluster_hosts.yml
index 198a3e4e2..15690e3bf 100644
--- a/playbooks/libvirt/openshift-cluster/cluster_hosts.yml
+++ b/playbooks/libvirt/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-node']|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([]) }}"
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([]) }}"