Ansible 'search' is a test not a filter

Older ansible versions used search as a filter but this is no longer
valid, and search should be used as a test

Change-Id: I4d846b7704e22d1ae58163d413c86dd01ff3563c
This commit is contained in:
Dmitriy Rabotyagov
2019-11-05 19:54:48 +02:00
parent 246ff262e5
commit 95bd648ef0
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@
when:
- not rabbitmq_upgrade | bool
- installed_rabbitmq.rc == 0
- not installed_rabbitmq.stdout | search(rabbitmq_package_version)
- not installed_rabbitmq.stdout is search(rabbitmq_package_version)
- rabbitmq_install_method != 'distro'
tags:
- rabbitmq-package-deb

View File

@@ -88,4 +88,4 @@
# Expected policy: "/ HA all ^(?!amq\\.).* {"ha-mode":"all"} 0"
- name: Validate that the expected policies are present
assert:
that: rabbitmq_policies_output.stdout | search("amq")
that: rabbitmq_policies_output.stdout is search("amq")