some phx2 boxes are staging. some are not
This commit is contained in:
parent
021ad147d3
commit
4678df47be
1 changed files with 27 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
||||||
|
{% for host in groups['all'] %}
|
||||||
|
{% if hostvars[host].datacenter == 'staging' %}
|
||||||
|
define host {
|
||||||
|
use defaulttemplate
|
||||||
|
host_name {{ host }}
|
||||||
|
{% if hostvars[host].ansible_hostname is defined %}
|
||||||
|
alias {{ hostvars[host].ansible_hostname }}
|
||||||
|
{% else %}
|
||||||
|
alias {{ host }}
|
||||||
|
{% endif %}
|
||||||
|
{% if hostvars[host].eth0_ip is defined %}
|
||||||
|
address {{ hostvars[host].eth0_ip }}
|
||||||
|
{% elif hostvars[host].ansible_default_ipv4 is defined %}
|
||||||
|
{% if hostvars[host].ansible_default_ipv4.address is defined %}
|
||||||
|
address {{ hostvars[host].ansible_default_ipv4.address }}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
address {{ host }}
|
||||||
|
{% endif %}
|
||||||
|
{% if hostvars[host]['vmhost'] is defined %}
|
||||||
|
parents {{ hostvars[host]['vmhost'] }}
|
||||||
|
{% elif hostvars[host].datacenter is defined %}
|
||||||
|
parents phx2-gw
|
||||||
|
{% endif %}
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue