You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/facts_linux_network/tasks/main.yml

19 lines
595 B
YAML

- block:
- name: Add IP to interface
command: ip address add 100.42.42.1/32 dev {{ ansible_facts.default_ipv4.interface }}
ignore_errors: yes
- name: Gather network facts
setup:
gather_subset: network
- name: Ensure broadcast is reported as empty
assert:
that:
- ansible_facts[ansible_facts['default_ipv4']['interface']]['ipv4_secondaries'][0]['broadcast'] == ''
always:
- name: Remove IP from interface
command: ip address delete 100.42.42.1/32 dev {{ ansible_facts.default_ipv4.interface }}
ignore_errors: yes