Ensure we have the ansible "interfaces" fact

It might happen this role isn't called without any fact gathering, for
instance running plain "ansible -m include_role -a role=tripleo_podman".

This small addition ensures we actually collect the needed things before
usage.

Change-Id: I2de4088bb3e9f3e049632f7d593a6ca8a2ac00de
This commit is contained in:
Cédric Jeanneret 2020-10-08 12:57:32 +02:00
parent d33cb5488a
commit a9b41f2370
1 changed files with 9 additions and 0 deletions

View File

@ -26,6 +26,15 @@
name: "{{ tripleo_podman_packages }}"
state: latest
- name: Ensure we get the ansible_interfaces fact
when:
- ansible_interfaces is undefined
setup:
gather_subset:
- '!all'
- '!min'
- 'interfaces'
- name: Delete legacy cni0 interface (podman < 1.6)
command: ip link delete cni0
when: