From 7389db2f75e7c9f3118a022cf10b77d13119e3c5 Mon Sep 17 00:00:00 2001 From: Alex Dworjan Date: Wed, 18 Oct 2023 12:56:14 -0400 Subject: [PATCH] fixed failed when statemen to use and --- .ansible-sign/sha256sum.txt | 2 +- .ansible-sign/sha256sum.txt.sig | 22 +++++++++++----------- roles/kafka/tasks/main.yml | 4 +++- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.ansible-sign/sha256sum.txt b/.ansible-sign/sha256sum.txt index b5439b6..5b45514 100644 --- a/.ansible-sign/sha256sum.txt +++ b/.ansible-sign/sha256sum.txt @@ -22,7 +22,7 @@ e0aa583a3faf802922a6cb66c3e2fa5906105a619a6d9821f47c6a068e728570 jenkins.yml d26a0f12ebb5835b5aa36074b24addf52fdca91939d97244eb682bb3bd05545e roles/jenkins_setup/files/shadowman.xml 3ce37f28b0b4cd83a86440fdfbc1148f6a61125dd4dcf900b953778a588ac12b roles/jenkins_setup/tasks/main.yml fde421bd02e9d5d96effcbef92b4657f2ed9283855cebafcb3246c4829882382 roles/kafka/handlers/main.yml -ce806d6bc4f26c4615bb86e2cf99b9b73962222c605492dcdc8fe4cb652380e7 roles/kafka/tasks/main.yml +b6feda249d68b441cf3dedb363eee0aa78543b6566b276542ec93da0830c5890 roles/kafka/tasks/main.yml 2d12114b12a76da493a951ed2c1abcd3d2d3e5a1ca0dcb0943fbc91665f5f91a roles/prometheus/defaults/main.yml a8355ca3078663433c90e991a1a9622ae2d5b911696aef4a62701ed6a454690c roles/prometheus/handlers/main.yml 4116ff338c5ffed270d770729ff19e4f0a85365be1745f282fd35f50ca660fd6 roles/prometheus/tasks/main.yml diff --git a/.ansible-sign/sha256sum.txt.sig b/.ansible-sign/sha256sum.txt.sig index c8eda30..f1e7637 100644 --- a/.ansible-sign/sha256sum.txt.sig +++ b/.ansible-sign/sha256sum.txt.sig @@ -1,14 +1,14 @@ -----BEGIN PGP SIGNATURE----- -iQGzBAABCAAdFiEE/bJvyFHKKJdaZDOLTiIi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gvFQut3ZZddWO5vWAV// +GR0q9MSVp0HtwxJOXFIHMnirun/n4yFx58rGAl5MtEg1gR9v56gaIKT9u7ek6pdt +uhEETRZm +=ztj9 -----END PGP SIGNATURE----- diff --git a/roles/kafka/tasks/main.yml b/roles/kafka/tasks/main.yml index 9e60a7c..ece3a5d 100644 --- a/roles/kafka/tasks/main.yml +++ b/roles/kafka/tasks/main.yml @@ -64,6 +64,8 @@ ansible.builtin.command: "/opt/kafka_2.13-3.6.0/bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic {{ topic }}" register: kafkatopic changed_when: kafkatopic.stdout == "Created topic " ~ topic ~ "." - failed_when: kafkatopic.stdout != "Created topic " ~ topic ~ "." or "already exists" not in kafkatopic.stderr + failed_when: + - '"already exists" not in kafkatopic.stderr' + - kafkatopic.stdout != "Created topic " ~ topic ~ "." tags: - createtopic