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
This commit is contained in:
Erik Berg 2020-03-15 02:20:54 +01:00
parent 72c88258b2
commit 7aa3d4a9ca

View File

@ -18,6 +18,7 @@
# 'skip_ansible_lint' tag # 'skip_ansible_lint' tag
- name: Get version of installed RabbitMQ package (deb) - name: Get version of installed RabbitMQ package (deb)
shell: "dpkg -l | grep rabbitmq-server" shell: "dpkg -l | grep rabbitmq-server"
changed_when: false
failed_when: false failed_when: false
register: installed_rabbitmq_deb register: installed_rabbitmq_deb
when: when:
@ -35,6 +36,7 @@
shell: "rpm -qa | grep rabbitmq-server" shell: "rpm -qa | grep rabbitmq-server"
args: args:
warn: no warn: no
changed_when: false
failed_when: false failed_when: false
register: installed_rabbitmq_rpm register: installed_rabbitmq_rpm
when: when:
@ -50,8 +52,7 @@
set_fact: set_fact:
installed_rabbitmq: "{{ item }}" installed_rabbitmq: "{{ item }}"
when: when:
- not item is skipped - item is not skipped
- item is changed
with_items: with_items:
- "{{ installed_rabbitmq_deb }}" - "{{ installed_rabbitmq_deb }}"
- "{{ installed_rabbitmq_rpm }}" - "{{ installed_rabbitmq_rpm }}"