[libvirt] [jenkins-ci PATCH] guests: Don't use filters as conditionals

Andrea Bolognani posted 1 patch 5 years, 10 months ago
Failed in applying to current master (apply log)
guests/tasks/base.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [jenkins-ci PATCH] guests: Don't use filters as conditionals
Posted by Andrea Bolognani 5 years, 10 months ago
Recent versions of Ansible point out this mistake too.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
To be applied on top of

  https://www.redhat.com/archives/libvir-list/2018-June/msg00685.html

Should have posted both at the same time as a series, but
it's too late for that now ¯\_(ツ)_/¯

 guests/tasks/base.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml
index 3793153..b774b29 100644
--- a/guests/tasks/base.yml
+++ b/guests/tasks/base.yml
@@ -21,14 +21,14 @@
     os_version: Sid
   when:
     - os_name == 'Debian'
-    - ansible_distribution_major_version|match("^.*/sid$")
+    - ansible_distribution_major_version is match("^.*/sid$")
 
 - name: Set additional facts (OS)
   set_fact:
     os_version: Current
   when:
     - ansible_distribution == 'FreeBSD'
-    - ansible_distribution_release|match("^.*-CURRENT$")
+    - ansible_distribution_release is match("^.*-CURRENT$")
 
 - name: Set additional facts (package format)
   set_fact:
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH] guests: Don't use filters as conditionals
Posted by Katerina Koukiou 5 years, 10 months ago
On Fri, Jun 08, 2018 at 04:35:18PM +0200, Andrea Bolognani wrote:
> Recent versions of Ansible point out this mistake too.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
> To be applied on top of
> 
>   https://www.redhat.com/archives/libvir-list/2018-June/msg00685.html
> 
> Should have posted both at the same time as a series, but
> it's too late for that now ¯\_(ツ)_/¯
> 
>  guests/tasks/base.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list