From f21bc666710fc83c1c14c616beb699a915a6ab2c Mon Sep 17 00:00:00 2001
From: Corey Wright <corey.wright@rackspace.com>
Date: Sun, 15 Jul 2018 15:05:12 -0500
Subject: [PATCH] mnaio: Only resize Swift & Cinder machines00 LV when using
 nspawn

Commit 875fa96f / change-id Ief0040f6 unintentionally tries to enlarge
the "machines00" LV when LXC is the default container technology which
fails due to the Debian automated installation having assigned all the
space within the associated "vmvg00" VG.

As the intention of the aforementioned commit was to apply when
systemd-nspawn was used, codify that explicitly in a `when:` condition
on the problematic Ansible task.

Change-Id: I56ec1290d71d0d09db447e347d7d55432d9b81c6
Signed-off-by: Corey Wright <corey.wright@rackspace.com>
Closes-Bug: #1781823
---
 multi-node-aio/playbooks/deploy-vms.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/multi-node-aio/playbooks/deploy-vms.yml b/multi-node-aio/playbooks/deploy-vms.yml
index 533ae0c7..14723469 100644
--- a/multi-node-aio/playbooks/deploy-vms.yml
+++ b/multi-node-aio/playbooks/deploy-vms.yml
@@ -272,6 +272,8 @@
         size: 8192
         shrink: yes
         force: yes
+      when:
+        - default_container_tech | default('lxc') == 'nspawn'
 
     - name: Remove lxc00 volume group
       lvol: