-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
fatal: [hypervisor]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'nic_name' is undefined\n\nThe error appears to be in '/home/infrared/.infrared/plugins/virsh/tasks/bridged_network.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n# https://jamielinux.com/docs/libvirt-networking-handbook/bridged-network.html#bridged-network\n- name: validate required nic is present\n ^ here\n"}
- name: create bridged network |
- name: create bridged network
include_tasks: tasks/bridged_network.yml
vars:
nic_settings: "{{ item }}"
nic_data: "{{ (item.nic == '') | ternary(hostvars[inventory_hostname]['ansible_' + ansible_default_ipv4.interface],
hostvars[inventory_hostname]['ansible_' + item.nic]|default('')) }}"
with_items:
"{{ networks.values() | selectattr('forward', 'defined') | selectattr('forward', 'equalto', 'bridge') | list }}"
when: "networks is defined"
msg: "Cannot find bridge nic: {{ nic_name }}" |
- name: validate required nic is present
fail:
msg: "Cannot find bridge nic: {{ nic_name }}"
when: nic_data == ''
Metadata
Metadata
Assignees
Labels
No labels