From 4da629bcae59ce744584fdf10960b89008e91665 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 31 Mar 2021 17:59:06 +0300 Subject: [PATCH] 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 --- playbooks/containers-lxc-create.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/playbooks/containers-lxc-create.yml b/playbooks/containers-lxc-create.yml index e59dd75bd8..e9527769b7 100644 --- a/playbooks/containers-lxc-create.yml +++ b/playbooks/containers-lxc-create.yml @@ -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