Fix conditional checks with inventory_hostname
This commit is contained in:
parent
91313e848e
commit
52862f9daf
|
@ -16,7 +16,7 @@ line vty
|
||||||
! BGP EVPN mesh configuration
|
! BGP EVPN mesh configuration
|
||||||
!
|
!
|
||||||
router bgp {{ pvc_asn }}
|
router bgp {{ pvc_asn }}
|
||||||
bgp router-id {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.router_id }}{% endfor %}
|
bgp router-id {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.router_id }}{% endfor %}
|
||||||
|
|
||||||
no bgp default ipv4-unicast
|
no bgp default ipv4-unicast
|
||||||
! BGP sessions with route reflectors
|
! BGP sessions with route reflectors
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
listen_tls = 0
|
listen_tls = 0
|
||||||
listen_tcp = 1
|
listen_tcp = 1
|
||||||
listen_addr = "{% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}{% endfor %}"
|
listen_addr = "{% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.cluster_ip }}{% endfor %}"
|
||||||
tcp_port = "16509"
|
tcp_port = "16509"
|
||||||
auth_tcp = "none"
|
auth_tcp = "none"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# pvcnoded configuration
|
# pvcnoded configuration
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
pvc:
|
pvc:
|
||||||
node: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.hostname }}{% endfor %}
|
node: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.hostname }}{% endfor %}
|
||||||
|
|
||||||
debug: False
|
debug: False
|
||||||
functions:
|
functions:
|
||||||
|
@ -54,11 +54,11 @@ pvc:
|
||||||
successful_fence: migrate
|
successful_fence: migrate
|
||||||
failed_fence: None
|
failed_fence: None
|
||||||
ipmi:
|
ipmi:
|
||||||
host: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.ipmi_host }}{% endfor %}
|
host: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.ipmi_host }}{% endfor %}
|
||||||
|
|
||||||
user: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.ipmi_user }}{% endfor %}
|
user: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.ipmi_user }}{% endfor %}
|
||||||
|
|
||||||
pass: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.ipmi_password }}{% endfor %}
|
pass: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.ipmi_password }}{% endfor %}
|
||||||
|
|
||||||
migration:
|
migration:
|
||||||
target_selector: mem
|
target_selector: mem
|
||||||
|
@ -81,15 +81,15 @@ pvc:
|
||||||
upstream:
|
upstream:
|
||||||
device: {{ pvc_upstream_device }}
|
device: {{ pvc_upstream_device }}
|
||||||
mtu: {{ pvc_upstream_mtu }}
|
mtu: {{ pvc_upstream_mtu }}
|
||||||
address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.upstream_ip }}/{{ pvc_upstream_netmask }}{% endfor %}
|
address: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.upstream_ip }}/{{ pvc_upstream_netmask }}{% endfor %}
|
||||||
|
|
||||||
cluster:
|
cluster:
|
||||||
device: {{ pvc_cluster_device }}
|
device: {{ pvc_cluster_device }}
|
||||||
mtu: {{ pvc_cluster_mtu }}
|
mtu: {{ pvc_cluster_mtu }}
|
||||||
address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.cluster_ip }}/{{ pvc_cluster_netmask }}{% endfor %}
|
address: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.cluster_ip }}/{{ pvc_cluster_netmask }}{% endfor %}
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
device: {{ pvc_storage_device }}
|
device: {{ pvc_storage_device }}
|
||||||
mtu: {{ pvc_storage_mtu }}
|
mtu: {{ pvc_storage_mtu }}
|
||||||
address: {% for node in pvc_nodes if node.hostname == ansible_hostname %}{{ node.storage_ip }}/{{ pvc_storage_netmask }}{% endfor %}
|
address: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.storage_ip }}/{{ pvc_storage_netmask }}{% endfor %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue