[osbs-inventory] populate hosts based on datacenter
This commit is contained in:
parent
6cffec74b5
commit
9e65bba022
1 changed files with 10 additions and 0 deletions
|
@ -2,25 +2,35 @@
|
|||
# openshift-ansible project available:
|
||||
# https://github.com/openshift/openshift-ansible/tree/master/inventory/byo
|
||||
|
||||
|
||||
[masters]
|
||||
{% for host in groups[openshift_cluster_masters_group] %}
|
||||
{% if hostvars[host].datacenter == datacenter %}
|
||||
{{ host }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
[etcd]
|
||||
{% for host in groups[openshift_cluster_masters_group] %}
|
||||
{% if hostvars[host].datacenter == datacenter %}
|
||||
{{ host }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
[nodes]
|
||||
{% for host in groups[openshift_cluster_masters_group] %}
|
||||
{% if hostvars[host].datacenter == datacenter %}
|
||||
{{ host }} openshift_node_group_name='node-config-master'
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for host in groups[openshift_cluster_nodes_group] %}
|
||||
{% if hostvars[host].datacenter == datacenter %}
|
||||
{{ host }} openshift_node_group_name='node-config-compute'
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
# Create an OSEv3 group that contains the masters and nodes groups
|
||||
[OSEv3:children]
|
||||
masters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue