From e9bb87e7a6cada3a60f83bcdab9f52be0cf13b12 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 12 Jul 2018 16:44:21 +0200 Subject: [PATCH] Fix usage of "|" for tests With the more recent versions of ansible, we should now use "is" instead of the "|" sign for the tests. This should fix it. Change-Id: I95b55ff5a5932a9d1214f357a32cf1e4393f82af --- tasks/main.yml | 2 +- tasks/nspawn_cache_prestage.yml | 2 +- tasks/nspawn_volume.yml | 2 +- tests/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 67d4e66..ea16799 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -54,7 +54,7 @@ pkg: "{{ nspawn_hosts_distro_packages }}" state: "{{ nspawn_hosts_package_state }}" register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 notify: diff --git a/tasks/nspawn_cache_prestage.yml b/tasks/nspawn_cache_prestage.yml index b356598..70544fc 100644 --- a/tasks/nspawn_cache_prestage.yml +++ b/tasks/nspawn_cache_prestage.yml @@ -40,7 +40,7 @@ register: legacy_image_url retries: 3 delay: 1 - until: legacy_image_url | success + until: legacy_image_url is success - name: Set nspawn cache fact(s) (legacy) set_fact: diff --git a/tasks/nspawn_volume.yml b/tasks/nspawn_volume.yml index d7f7b4d..a66d6d0 100644 --- a/tasks/nspawn_volume.yml +++ b/tasks/nspawn_volume.yml @@ -129,4 +129,4 @@ changed_when: false failed_when: false when: - - machines_create | changed + - machines_create is changed diff --git a/tests/test.yml b/tests/test.yml index b951c79..e6f824a 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -118,7 +118,7 @@ path: /var/lib/machines/test-container/test-file state: touch failed_when: - - read_only_test | success + - read_only_test is success register: read_only_test - name: Remove base image