Fixes empty metal_query
Due to wrong quote used, json_query returned empty value, which caused all metal host always recieve ansible_host (as default value) Change-Id: Ib5d65166cb944ebd6214d891fe1b11a9f1e254f1
This commit is contained in:
parent
dcf448ec81
commit
09569c30f9
@ -19,7 +19,7 @@
|
||||
query: "{{ is_metal | ternary(metal_query, non_metal_query) }}"
|
||||
non_metal_query: "container_networks.{{ network_address }}.address || ansible_host"
|
||||
find_bridge: "container_networks.{{ network_address }}.bridge"
|
||||
metal_query: "'ansible_{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace('-','_') }}'.ipv4.address || {{ non_metal_query }}"
|
||||
metal_query: "\"ansible_{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace('-','_') }}\".ipv4.address || {{ non_metal_query }}"
|
||||
tags:
|
||||
- common-address
|
||||
- always
|
||||
|
Loading…
Reference in New Issue
Block a user