From 1a12108dd851f674659633fb6fd39ebf9119a9d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fl=C3=A1vio=20Ramalho?= <framalho@suse.com>
Date: Thu, 22 Oct 2020 12:20:00 +0200
Subject: [PATCH] Add support for ansible 2.9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Flávio Ramalho <framalho@suse.com>
---
 group_vars/all_group                                    | 2 +-
 roles/cassandra/tasks/create_roles.yml                  | 6 +++---
 roles/galera/tasks/configure.yml                        | 2 +-
 roles/galera/tasks/configure_iptables.yml               | 4 ++--
 roles/grafana/tasks/install_RedHat.yml                  | 2 +-
 roles/grafana/tasks/install_Suse.yml                    | 2 +-
 roles/kafka/tasks/configure.yml                         | 2 +-
 roles/mariadb/tasks/configure.yml                       | 2 +-
 roles/memcached/tasks/configure.yml                     | 2 +-
 roles/memcached/tasks/configure_firewalld.yml           | 2 +-
 roles/monasca-api/tasks/configure_firewalld.yml         | 2 +-
 roles/monasca-api/tasks/status.yml                      | 4 ++--
 roles/monasca-elasticsearch/tasks/configure_tarball.yml | 2 +-
 roles/monasca-kibana/tasks/configure_network.yml        | 2 +-
 roles/monasca-kibana/tasks/install_rpm.yml              | 2 +-
 roles/monasca-log-api/tasks/configure_network.yml       | 2 +-
 roles/monasca-log-api/tasks/status.yml                  | 4 ++--
 roles/monasca-log-metrics/tasks/configure.yml           | 4 ++--
 roles/monasca-log-persister/tasks/configure.yml         | 4 ++--
 roles/monasca-log-schema/tasks/kafka_topics.yaml        | 2 +-
 roles/monasca-log-transformer/tasks/configure.yml       | 4 ++--
 roles/monasca-notification/tasks/configure_pip.yml      | 2 +-
 roles/monasca-schema/tasks/cassandra.yml                | 2 +-
 roles/monasca-schema/tasks/influxdb.yml                 | 2 +-
 roles/monasca-schema/tasks/kafka_topics.yml             | 2 +-
 roles/monasca-schema/tasks/migration.yml                | 2 +-
 roles/monasca-schema/tasks/mysql.yml                    | 2 +-
 roles/monasca-schema/tasks/postgres.yml                 | 2 +-
 roles/monasca-schema/tasks/vertica.yml                  | 6 +++---
 roles/monasca-schema/tasks/winchester.yml               | 2 +-
 roles/zookeeper/tasks/install_RedHat.yml                | 2 +-
 tasks/verify_ansible.yml                                | 2 +-
 tasks/verify_pip.yml                                    | 2 +-
 33 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/group_vars/all_group b/group_vars/all_group
index 167b05c..6a86b5e 100644
--- a/group_vars/all_group
+++ b/group_vars/all_group
@@ -102,7 +102,7 @@ ansible_version_min:
   ver: "2.2.0.0"
   constraint: ">="
 ansible_version_max:
-  ver: "2.5.0.0"
+  ver: "2.10.0.0"
   constraint: "<"
 pip_version_min: 8.1.1
 
diff --git a/roles/cassandra/tasks/create_roles.yml b/roles/cassandra/tasks/create_roles.yml
index 01a84b1..3c1bb8b 100644
--- a/roles/cassandra/tasks/create_roles.yml
+++ b/roles/cassandra/tasks/create_roles.yml
@@ -10,7 +10,7 @@
   register: list_roles_default
 
 - name: Initialize password for superuser role
-  when: list_roles_default|succeeded
+  when: list_roles_default is succeeded
   shell: >
      cqlsh -u {{ cassandra_admin_role }}
      -p '{{ cassandra_default_admin_password }}'
@@ -31,7 +31,7 @@
   register: list_roles_configured_password
 
 - name: Create role for monasca-api
-  when: list_roles_configured_password|succeeded
+  when: list_roles_configured_password is succeeded
   shell: >
      cqlsh -u {{ cassandra_admin_role }}
      -p '{{ cassandra_admin_password }}'
@@ -46,7 +46,7 @@
      {{ cassandra_host }}
 
 - name: Create role for monasca-persister
-  when: list_roles_configured_password|succeeded
+  when: list_roles_configured_password is succeeded
   shell: >
      cqlsh -u {{ cassandra_admin_role }}
      -p '{{ cassandra_admin_password }}'
diff --git a/roles/galera/tasks/configure.yml b/roles/galera/tasks/configure.yml
index 3f8d48f..a9b348f 100644
--- a/roles/galera/tasks/configure.yml
+++ b/roles/galera/tasks/configure.yml
@@ -13,7 +13,7 @@
 
 - name: Make sure MariaDB did not start before it is configured
   service: name=mysql state=stopped
-  when: install_result|changed
+  when: install_result is changed
   ignore_errors: true
 
 - name: Write custom server configuration
diff --git a/roles/galera/tasks/configure_iptables.yml b/roles/galera/tasks/configure_iptables.yml
index 8771661..fc23237 100644
--- a/roles/galera/tasks/configure_iptables.yml
+++ b/roles/galera/tasks/configure_iptables.yml
@@ -17,7 +17,7 @@
   register: check_allow_galera
   ignore_errors: yes
   changed_when: no
-  always_run: yes
+  check_mode: no
   when: firewalld is not defined or firewalld.rc != 0
 
 - name: Allow MariaDB Galera ports to be connected only with each other
@@ -42,7 +42,7 @@
   register: check_allow_lb
   ignore_errors: yes
   changed_when: no
-  always_run: yes
+  check_mode: no
   when: firewalld is not defined or firewalld.rc != 0
 
 - name: Allow MariaDB ports to be connected only from load balancer nodes
diff --git a/roles/grafana/tasks/install_RedHat.yml b/roles/grafana/tasks/install_RedHat.yml
index 61d0fa2..50b07e3 100644
--- a/roles/grafana/tasks/install_RedHat.yml
+++ b/roles/grafana/tasks/install_RedHat.yml
@@ -28,4 +28,4 @@
 
 - name: Reload systemctl
   command: systemctl daemon-reload
-  when: use_systemd and grafana_install_result|changed
+  when: use_systemd and grafana_install_result is changed
diff --git a/roles/grafana/tasks/install_Suse.yml b/roles/grafana/tasks/install_Suse.yml
index 25c0486..d243b56 100644
--- a/roles/grafana/tasks/install_Suse.yml
+++ b/roles/grafana/tasks/install_Suse.yml
@@ -25,4 +25,4 @@
 
 - name: Reload systemctl
   command: systemctl daemon-reload
-  when: use_systemd and grafana_install_result|changed
+  when: use_systemd and grafana_install_result is changed
diff --git a/roles/kafka/tasks/configure.yml b/roles/kafka/tasks/configure.yml
index be14136..683989b 100644
--- a/roles/kafka/tasks/configure.yml
+++ b/roles/kafka/tasks/configure.yml
@@ -43,7 +43,7 @@
     backrefs=yes
   notify:
     - restart kafka
-  when: kafka_version|version_compare('0.8', '>=')
+  when: kafka_version is version_compare('0.8', '>=')
 
 # Setup log4j.properties
 - name: Create log4j.properties
diff --git a/roles/mariadb/tasks/configure.yml b/roles/mariadb/tasks/configure.yml
index d8764bf..7c1b52f 100644
--- a/roles/mariadb/tasks/configure.yml
+++ b/roles/mariadb/tasks/configure.yml
@@ -13,7 +13,7 @@
 
 - name: Make sure MariaDB did not start before it is configured for the first time
   service: name=mysql state=stopped
-  when: install_result|changed
+  when: install_result is changed
   ignore_errors: true
 
 - name: Write custom server configuration
diff --git a/roles/memcached/tasks/configure.yml b/roles/memcached/tasks/configure.yml
index 7d472c4..b79cc0f 100644
--- a/roles/memcached/tasks/configure.yml
+++ b/roles/memcached/tasks/configure.yml
@@ -20,4 +20,4 @@
     name=memcached
     state=restarted
     enabled=yes
-  when: memcached_config|changed
+  when: memcached_config is changed
diff --git a/roles/memcached/tasks/configure_firewalld.yml b/roles/memcached/tasks/configure_firewalld.yml
index 7efde2f..9b0eff3 100644
--- a/roles/memcached/tasks/configure_firewalld.yml
+++ b/roles/memcached/tasks/configure_firewalld.yml
@@ -21,7 +21,7 @@
   register: check_allow_tcp
   ignore_errors: yes
   changed_when: no
-  always_run: yes
+  check_mode: no
   when: firewalld is not defined or firewalld.rc != 0
 
 - name: Allow ports
diff --git a/roles/monasca-api/tasks/configure_firewalld.yml b/roles/monasca-api/tasks/configure_firewalld.yml
index 87f6c81..5d7431d 100644
--- a/roles/monasca-api/tasks/configure_firewalld.yml
+++ b/roles/monasca-api/tasks/configure_firewalld.yml
@@ -23,7 +23,7 @@
     register: check_allow_tcp
     ignore_errors: yes
     changed_when: no
-    always_run: yes
+    check_mode: no
     when: not use_systemd or (firewalld is not defined or firewalld.rc != 0)
 
   - name: Allow ports
diff --git a/roles/monasca-api/tasks/status.yml b/roles/monasca-api/tasks/status.yml
index 4ed38a9..1b4ee03 100644
--- a/roles/monasca-api/tasks/status.yml
+++ b/roles/monasca-api/tasks/status.yml
@@ -18,11 +18,11 @@
     url: "http://{{ monasca_api_ip|trim|safe|default('127.0.0.1') }}:{{ monasca_api_client_port|int }}/"
     method: GET
     status_code: 401
-  when: monasca_api_wfp_status|succeeded
+  when: monasca_api_wfp_status is succeeded
   register: monasca_api_healthcheck_status
 
 - name: Verify monaca-log-api status
   fail:
     msg: "monasca-api is not accessible"
-  when: not (monasca_api_wfp_status|succeeded and monasca_api_healthcheck_status|succeeded)
+  when: not (monasca_api_wfp_status is succeeded and monasca_api_healthcheck_status is succeeded)
 
diff --git a/roles/monasca-elasticsearch/tasks/configure_tarball.yml b/roles/monasca-elasticsearch/tasks/configure_tarball.yml
index 2b67b8e..da0baad 100644
--- a/roles/monasca-elasticsearch/tasks/configure_tarball.yml
+++ b/roles/monasca-elasticsearch/tasks/configure_tarball.yml
@@ -12,4 +12,4 @@
 
 - name: Restart systemctl if needed
   command: systemctl daemon-reload
-  when: systemctl_cfg|changed
+  when: systemctl_cfg is changed
diff --git a/roles/monasca-kibana/tasks/configure_network.yml b/roles/monasca-kibana/tasks/configure_network.yml
index 90b3b99..1f9d10b 100644
--- a/roles/monasca-kibana/tasks/configure_network.yml
+++ b/roles/monasca-kibana/tasks/configure_network.yml
@@ -24,7 +24,7 @@
       register: check_allow_tcp
       ignore_errors: yes
       changed_when: no
-      always_run: yes
+      check_mode: no
       when: firewalld is not defined or firewalld.rc != 0
 
     - name: Firewall::Allow ports
diff --git a/roles/monasca-kibana/tasks/install_rpm.yml b/roles/monasca-kibana/tasks/install_rpm.yml
index 844eac5..8a1fecf 100644
--- a/roles/monasca-kibana/tasks/install_rpm.yml
+++ b/roles/monasca-kibana/tasks/install_rpm.yml
@@ -17,4 +17,4 @@
   set_fact:
     kibana_plugins: "{{ kibana_plugins | combine({ item.item.key: {'url': item.stdout}}, recursive=True) }}"
   with_items: "{{ kibana_plugins_rpm_path.results }}"
-  when: "{{ kibana_plugins|length > 0 and kibana_plugins_rpm_path|changed }}"
+  when: "{{ kibana_plugins|length > 0 and kibana_plugins_rpm_path is changed }}"
diff --git a/roles/monasca-log-api/tasks/configure_network.yml b/roles/monasca-log-api/tasks/configure_network.yml
index f352424..44d81f4 100644
--- a/roles/monasca-log-api/tasks/configure_network.yml
+++ b/roles/monasca-log-api/tasks/configure_network.yml
@@ -23,7 +23,7 @@
     register: check_allow_tcp
     ignore_errors: yes
     changed_when: no
-    always_run: yes
+    check_mode: no
     when: firewalld is not defined or firewalld.rc != 0
 
   - name: Allow ports
diff --git a/roles/monasca-log-api/tasks/status.yml b/roles/monasca-log-api/tasks/status.yml
index 53c9a37..639a9fc 100644
--- a/roles/monasca-log-api/tasks/status.yml
+++ b/roles/monasca-log-api/tasks/status.yml
@@ -14,11 +14,11 @@
     url: "{{ log_api_use_ssl|ternary('https','http') }}://{{ log_api_ip|trim|safe|default('127.0.0.1') }}:{{ log_api_port|int }}/healthcheck"
     method: HEAD
     status_code: 204
-  when: log_api_wfp_status|succeeded
+  when: log_api_wfp_status is succeeded
   register: log_api_healthcheck_status
 
 - name: Verify monaca-log-api status
   fail:
     msg: "monasca-log-api is not accessible"
-  when: not (log_api_wfp_status|succeeded and log_api_healthcheck_status|succeeded)
+  when: not (log_api_wfp_status is succeeded and log_api_healthcheck_status is succeeded)
 
diff --git a/roles/monasca-log-metrics/tasks/configure.yml b/roles/monasca-log-metrics/tasks/configure.yml
index c41741e..bafc939 100644
--- a/roles/monasca-log-metrics/tasks/configure.yml
+++ b/roles/monasca-log-metrics/tasks/configure.yml
@@ -33,7 +33,7 @@
 
 - name: Restart systemctl if needed
   command: systemctl daemon-reload
-  when: systemctl_cfg|changed
+  when: systemctl_cfg is changed
 
 - meta: flush_handlers
-  when: (upstart_cfg|changed or systemctl_cfg|changed)
+  when: (upstart_cfg is changed or systemctl_cfg is changed)
diff --git a/roles/monasca-log-persister/tasks/configure.yml b/roles/monasca-log-persister/tasks/configure.yml
index a0af476..be57ae3 100644
--- a/roles/monasca-log-persister/tasks/configure.yml
+++ b/roles/monasca-log-persister/tasks/configure.yml
@@ -33,7 +33,7 @@
 
 - name: Restart systemctl if needed
   command: systemctl daemon-reload
-  when: systemctl_cfg|changed
+  when: systemctl_cfg is changed
 
 - meta: flush_handlers
-  when: (upstart_cfg|changed or systemctl_cfg|changed)
+  when: (upstart_cfg is changed or systemctl_cfg is changed)
diff --git a/roles/monasca-log-schema/tasks/kafka_topics.yaml b/roles/monasca-log-schema/tasks/kafka_topics.yaml
index 48df50e..bcfa4e8 100644
--- a/roles/monasca-log-schema/tasks/kafka_topics.yaml
+++ b/roles/monasca-log-schema/tasks/kafka_topics.yaml
@@ -23,5 +23,5 @@
           --config {{ item.value.retention_time }}
           --config {{ item.value.max_message_bytes }}"
   with_dict: "{{ kafka_log_topics }}"
-  when: check_result|failed
+  when: check_result is failed
   tags: kafka_log_topics
diff --git a/roles/monasca-log-transformer/tasks/configure.yml b/roles/monasca-log-transformer/tasks/configure.yml
index b40e127..212226f 100644
--- a/roles/monasca-log-transformer/tasks/configure.yml
+++ b/roles/monasca-log-transformer/tasks/configure.yml
@@ -33,7 +33,7 @@
 
 - name: Restart systemctl if needed
   command: systemctl daemon-reload
-  when: systemctl_cfg|changed
+  when: systemctl_cfg is changed
 
 - meta: flush_handlers
-  when: (upstart_cfg|changed or systemctl_cfg|changed)
+  when: (upstart_cfg is changed or systemctl_cfg is changed)
diff --git a/roles/monasca-notification/tasks/configure_pip.yml b/roles/monasca-notification/tasks/configure_pip.yml
index 6a4a0a8..7d18f48 100644
--- a/roles/monasca-notification/tasks/configure_pip.yml
+++ b/roles/monasca-notification/tasks/configure_pip.yml
@@ -42,4 +42,4 @@
   register: systemd_changed
 
 - command: systemctl daemon-reload
-  when: use_systemd and systemd_changed|changed
+  when: use_systemd and systemd_changed is changed
diff --git a/roles/monasca-schema/tasks/cassandra.yml b/roles/monasca-schema/tasks/cassandra.yml
index 74970a6..19316b5 100644
--- a/roles/monasca-schema/tasks/cassandra.yml
+++ b/roles/monasca-schema/tasks/cassandra.yml
@@ -27,7 +27,7 @@
 - name: Apply Cassandra schema
   tags:
     - cassandra_schema
-  when: cassandra_schema_exists|failed
+  when: cassandra_schema_exists is failed
   shell: >
      cqlsh -u {{ cassandra_admin_role }}
      -p '{{ cassandra_admin_password }}'
diff --git a/roles/monasca-schema/tasks/influxdb.yml b/roles/monasca-schema/tasks/influxdb.yml
index 216216b..46292c4 100644
--- a/roles/monasca-schema/tasks/influxdb.yml
+++ b/roles/monasca-schema/tasks/influxdb.yml
@@ -16,7 +16,7 @@
 - name: Run the influxdb setup script
   command: /tmp/influxdb_setup.py
   register: result
-  until: result | success
+  until: result is success
   retries: 5
   delay: 2
   tags: influxdb_schema
diff --git a/roles/monasca-schema/tasks/kafka_topics.yml b/roles/monasca-schema/tasks/kafka_topics.yml
index f49e90e..804dd11 100644
--- a/roles/monasca-schema/tasks/kafka_topics.yml
+++ b/roles/monasca-schema/tasks/kafka_topics.yml
@@ -12,5 +12,5 @@
 - name: Create topics
   command: "{{ kafka_bin_dir }}/kafka-topics.sh --create --zookeeper {{ zookeeper_hosts }} --replication-factor {{ item.value.replicas }} --partitions {{ item.value.partitions }} --topic {{ item.key }}"
   with_dict: "{{ kafka_topics }}"
-  when: check_result|failed
+  when: check_result is failed
   tags: kafka_topics
diff --git a/roles/monasca-schema/tasks/migration.yml b/roles/monasca-schema/tasks/migration.yml
index e75b624..41a5165 100644
--- a/roles/monasca-schema/tasks/migration.yml
+++ b/roles/monasca-schema/tasks/migration.yml
@@ -28,7 +28,7 @@
 
 - name: Apply migration pack to db [mysql]
   shell: mysql -u{{ mysql_admin }} {% if mysql_admin_password is defined %} -p{{ mysql_admin_password }} {% endif %} < "{{ migration_pack_dir_dest }}/{{ item }}.sql"
-  when: mysql_m_pack | changed
+  when: mysql_m_pack is changed
   with_items: "{{ migration_pack }}"
   tags:
     - mysql
diff --git a/roles/monasca-schema/tasks/mysql.yml b/roles/monasca-schema/tasks/mysql.yml
index 123417f..20a8fb4 100644
--- a/roles/monasca-schema/tasks/mysql.yml
+++ b/roles/monasca-schema/tasks/mysql.yml
@@ -16,7 +16,7 @@
 
 - name: Apply MySQL scripts to database
   shell: "mysql -u{{ mysql_admin }} {% if mysql_admin_password is defined %} -p{{ mysql_admin_password }} {% endif %} < {{ item.dest }} || echo \"Did the schema change? This process will fail on schema changes.\""
-  when: copy_result|changed
+  when: copy_result is changed
   with_items:
     - "{{ mysql_files }}"
   tags: mysql_schema
diff --git a/roles/monasca-schema/tasks/postgres.yml b/roles/monasca-schema/tasks/postgres.yml
index 013c190..fba8fd6 100644
--- a/roles/monasca-schema/tasks/postgres.yml
+++ b/roles/monasca-schema/tasks/postgres.yml
@@ -65,7 +65,7 @@
 - name: Apply postgres schema to db
   become_user: "{{ postgres_user }}"
   shell: ". /etc/environment; {% if postgresql_login_by_host == 'True' %} export PGPASSFILE={{postgres_homedir.stdout}}/.pgpass_; {% endif %} psql {% if postgresql_login_by_host == 'True' %} -h {{postgresql_login_host}} -p {{postgresql_login_port}} -U {{postgresql_login_user}} {% endif %} -d{{database_name}} < {{monasca_schema_file}} || echo 'Did the schema change? This process will fail on schema changes.'"
-  when: copy_result | changed
+  when: copy_result is changed
   tags: postgres_schema
 
 - name: Clenaup postgres pgpass
diff --git a/roles/monasca-schema/tasks/vertica.yml b/roles/monasca-schema/tasks/vertica.yml
index 89c1aec..f983319 100644
--- a/roles/monasca-schema/tasks/vertica.yml
+++ b/roles/monasca-schema/tasks/vertica.yml
@@ -12,14 +12,14 @@
 - name: Create database
   command: su dbadmin -c '/opt/vertica/bin/admintools -t create_db -s {{vertica_cluster | default('127.0.0.1')}} -d "{{ vertica_database_name }}" -p "{{vertica_dbadmin_password}}"'
   environment: "{{vertica_env}}"
-  when: create_database|failed
+  when: create_database is failed
   tags: vertica_schema
 
 - name: Set restart policy
   command: /opt/vertica/bin/admintools -t set_restart_policy -d {{ vertica_database_name }} -p always
   become_user: dbadmin
   environment: "{{vertica_env}}"
-  when: create_database|failed
+  when: create_database is failed
   tags: vertica_schema
 
 - name: Copy over vertica sql files
@@ -43,7 +43,7 @@
     - mon_metrics_schema.sql
     - mon_alarms_schema.sql
     - mon_users_and_limits.sql
-  when: sql_file_status|changed or sql_template_status|changed
+  when: sql_file_status is changed or sql_template_status is changed
   tags: vertica_schema
 
 - name: Create cron job to clean up old partitions
diff --git a/roles/monasca-schema/tasks/winchester.yml b/roles/monasca-schema/tasks/winchester.yml
index ff09f2d..e0d4e20 100644
--- a/roles/monasca-schema/tasks/winchester.yml
+++ b/roles/monasca-schema/tasks/winchester.yml
@@ -9,5 +9,5 @@
 
 - name: Apply winchester schema to mysql db
   shell: mysql -u{{mysql_admin}} {% if mysql_admin_password is defined %} -p{{mysql_admin_password}} {% endif %} < {{winchester_schema_file}} || echo "Did the schema change? This process will fail on schema changes."
-  when: copy_result|changed
+  when: copy_result is changed
   tags: winchester_schema
diff --git a/roles/zookeeper/tasks/install_RedHat.yml b/roles/zookeeper/tasks/install_RedHat.yml
index 141a566..c47dd4c 100644
--- a/roles/zookeeper/tasks/install_RedHat.yml
+++ b/roles/zookeeper/tasks/install_RedHat.yml
@@ -66,4 +66,4 @@
 
 - name: reload systemd
   command: /usr/bin/systemctl --system daemon-reload
-  when: zookeeper_service | changed
+  when: zookeeper_service is changed
diff --git a/tasks/verify_ansible.yml b/tasks/verify_ansible.yml
index 4c624df..7ce4a82 100755
--- a/tasks/verify_ansible.yml
+++ b/tasks/verify_ansible.yml
@@ -13,4 +13,4 @@
 
 - name: Verify if installed Ansible version is supported
   fail: msg="Ansible is in the wrong version - {{ ansible_installed_version.stdout_lines[0] }}. Supported version should be {{ ansible_version_min.constraint }} {{ ansible_version_min.ver }} and {{ ansible_version_max.constraint }} {{ ansible_version_max.ver }}"
-  when: "not ( '{{ ansible_installed_version.stdout }}' | version_compare('{{ ansible_version_min.ver }}', '{{ ansible_version_min.constraint }}') and  '{{ ansible_installed_version.stdout }}' | version_compare('{{ ansible_version_max.ver }}', '{{ ansible_version_max.constraint }}'))"
+  when: "not ( '{{ ansible_installed_version.stdout }}' is version_compare('{{ ansible_version_min.ver }}', '{{ ansible_version_min.constraint }}') and  '{{ ansible_installed_version.stdout }}' is version_compare('{{ ansible_version_max.ver }}', '{{ ansible_version_max.constraint }}'))"
diff --git a/tasks/verify_pip.yml b/tasks/verify_pip.yml
index 34d4097..c5000e0 100644
--- a/tasks/verify_pip.yml
+++ b/tasks/verify_pip.yml
@@ -19,4 +19,4 @@
 - name: Verify if installed Pip version is supported
   fail: msg="Pip is in the wrong version - {{ pip_version.stdout }}. Supported min pip version {{ pip_version_min }}"
   when: use_pip and pip_version.stdout is defined and (pip_version.stdout == '' or
-    not (pip_version.stdout | version_compare(pip_version_min, '>=')))
+    not (pip_version.stdout is version_compare(pip_version_min, '>=')))
-- 
2.24.3 (Apple Git-128)

