Browse Source

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 <kevin.carter@rackspace.com>
Kevin Carter 9 months ago
parent
commit
144bf1ccd9
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      tasks/nspawn_cache.yml

+ 2
- 2
tasks/nspawn_cache.yml View File

@@ -23,9 +23,9 @@
23 23
 
24 24
 - name: Add image cache
25 25
   command: "btrfs subvolume create /var/lib/machines/{{ nspawn_container_base_name }}"
26
+  args:
27
+    creates: "/var/lib/machines/{{ nspawn_container_base_name }}"
26 28
   register: cache_refresh_add
27
-  changed_when: cache_refresh_add.rc == 0
28
-  failed_when: cache_refresh_add.rc not in [0, 1]
29 29
   when:
30 30
     - nspawn_image_cache_refresh | bool
31 31
 

Loading…
Cancel
Save