From 87ffd71944c35d01eb45d062faec9c2c42aeffe4 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 14 Aug 2017 23:24:57 -0500 Subject: [PATCH] Ensure container facts are set on container create When containers are created or modified the facts for the new containers should be gathered to ensure subsequent playbook runs are not impacted by missing or otherwise defunct facts. Change-Id: I7f0c73c6004c29eb4fdc7c1cbf88cac91a489297 Signed-off-by: Kevin Carter --- playbooks/lxc-containers-create.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/lxc-containers-create.yml b/playbooks/lxc-containers-create.yml index a64b9543b5..30e97437aa 100644 --- a/playbooks/lxc-containers-create.yml +++ b/playbooks/lxc-containers-create.yml @@ -31,6 +31,10 @@ delay: "{{ lxc_container_wait_params.delay | default(omit) }}" sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}" timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}" + - name: Set local facts for new container(s) + setup: + filter: ansible_local + gather_subset: "!all" vars: is_metal: "{{ properties.is_metal|default(false) }}" environment: "{{ deployment_environment_variables | default({}) }}"