Ensure lxc_hosts have updated facts before container creation

This change adds a quick fact gather on lxc_hosts prior to creating the
containers. This was added because lxc-container-create will fail should
the facts be missing or stale.

Change-Id: Ie2b2dd35d64df76d214991c17d30d7af6455ee2a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-10-26 15:13:20 -05:00 committed by Kevin Carter (cloudnull)
parent 6e64a24085
commit 31a2c9da0e
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Gather lxc container host facts
hosts: "{{ lxc_host_group | default('lxc_hosts')}}"
gather_facts: "{{ gather_facts | default(True) }}"
- name: Create container(s)
hosts: "{{ container_group|default('all_containers') }}"
gather_facts: false