Fix facts collection for LXC hosts

When running lxc-containers-create it looks for lxc-hosts facts
to include. If playbook is re-run after some period of time it ends up
with being unable to invlude_vars because of facts being undefined.

Change-Id: I6699110bc401f02b08916f3d22a2d0b956e7ebb2
This commit is contained in:
Dmitriy Rabotyagov 2021-03-31 17:59:06 +03:00 committed by Dmitriy Rabotyagov
parent f1e56a32fe
commit 4da629bcae

View File

@ -29,6 +29,12 @@
- always
- lxc-containers-create
- name: Gather lxc hosts facts
hosts: "{{ lxc_host_group | default('lxc_hosts') }}"
gather_facts: true
tags:
- always
- name: Create container(s)
hosts: all_lxc_containers
user: root