From 7aa3d4a9ca8606967abe1fc1ce6071647ee6c930 Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Sun, 15 Mar 2020 02:20:54 +0100 Subject: [PATCH] rabbitmq_server: there's no system change on a package query There doesn't seem to be a need to check for changed either, and it's easier to read "when: item is not skipped" Change-Id: I7d8300bcdf0caf24485ce2edc5f2be2672369d2f --- tasks/rabbitmq_upgrade_check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/rabbitmq_upgrade_check.yml b/tasks/rabbitmq_upgrade_check.yml index 4dbf2a93..dc499323 100644 --- a/tasks/rabbitmq_upgrade_check.yml +++ b/tasks/rabbitmq_upgrade_check.yml @@ -18,6 +18,7 @@ # 'skip_ansible_lint' tag - name: Get version of installed RabbitMQ package (deb) shell: "dpkg -l | grep rabbitmq-server" + changed_when: false failed_when: false register: installed_rabbitmq_deb when: @@ -35,6 +36,7 @@ shell: "rpm -qa | grep rabbitmq-server" args: warn: no + changed_when: false failed_when: false register: installed_rabbitmq_rpm when: @@ -50,8 +52,7 @@ set_fact: installed_rabbitmq: "{{ item }}" when: - - not item is skipped - - item is changed + - item is not skipped with_items: - "{{ installed_rabbitmq_deb }}" - "{{ installed_rabbitmq_rpm }}"