From 144bf1ccd933461e7fdb23ed65542f67dde75fca Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 27 Jun 2018 14:14:59 -0500 Subject: [PATCH] Change subvolume create to unmask errors The subvolume creation task was running such that all errors were being masked. This change uses the creates argument to give us an idempotent task while also ensuring we're not masking real errors. Change-Id: I3b87457e8871128c32b8829f440ea69e0623bfd8 Signed-off-by: Kevin Carter --- tasks/nspawn_cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/nspawn_cache.yml b/tasks/nspawn_cache.yml index d75c31a..742a35b 100644 --- a/tasks/nspawn_cache.yml +++ b/tasks/nspawn_cache.yml @@ -23,9 +23,9 @@ - name: Add image cache command: "btrfs subvolume create /var/lib/machines/{{ nspawn_container_base_name }}" + args: + creates: "/var/lib/machines/{{ nspawn_container_base_name }}" register: cache_refresh_add - changed_when: cache_refresh_add.rc == 0 - failed_when: cache_refresh_add.rc not in [0, 1] when: - nspawn_image_cache_refresh | bool