Fix conditional checks with inventory_hostname
This commit is contained in:
parent
2afccf44fb
commit
fe40811f2b
|
@ -16,7 +16,7 @@ line vty
|
|||
! BGP EVPN mesh configuration
|
||||
!
|
||||
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
|
||||
! BGP sessions with route reflectors
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
listen_tls = 0
|
||||
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"
|
||||
auth_tcp = "none"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# pvcnoded configuration
|
||||
# {{ ansible_managed }}
|
||||
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
|
||||
functions:
|
||||
|
@ -54,11 +54,11 @@ pvc:
|
|||
successful_fence: migrate
|
||||
failed_fence: None
|
||||
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:
|
||||
target_selector: mem
|
||||
|
@ -81,15 +81,15 @@ pvc:
|
|||
upstream:
|
||||
device: {{ pvc_upstream_device }}
|
||||
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:
|
||||
device: {{ pvc_cluster_device }}
|
||||
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:
|
||||
device: {{ pvc_storage_device }}
|
||||
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