[tobiko-inventory] Set to empty string the default ansible_host value

Change-Id: I0a62df777323509813062fd432bafcaf4058fcd2
This commit is contained in:
Eduardo Olivares 2024-12-09 17:28:34 +01:00
parent a6c7652e2b
commit fc4a3943ba

View File

@ -37,7 +37,7 @@
vars: vars:
hostname: '{{ item.0 }}' hostname: '{{ item.0 }}'
varname: '{{ item.1 }}' varname: '{{ item.1 }}'
value: '{{ hostvars[hostname][varname] }}' value: '{{ hostvars[hostname][varname] | default("") }}'
loop: "{{ hostvars.keys() | product(['ansible_host']) | list }}" loop: "{{ hostvars.keys() | product(['ansible_host']) | list }}"
loop_control: loop_control:
label: '{{ hostname }}.{{ varname }} = {{ value }}' label: '{{ hostname }}.{{ varname }} = {{ value }}'