Fix RPM warnings, cleanup
This patch fixes the Ansible warnings about using RPM and it cleans up a "when" to make it easier to read. Change-Id: Iff27f90654a5b21a7e59d7cca4ed6e83cde74716
This commit is contained in:
parent
83a95efda1
commit
0534bbf490
@ -17,8 +17,7 @@
|
||||
# so we skip this task in the ansible-lint check by using the
|
||||
# 'skip_ansible_lint' tag
|
||||
- name: Get version of installed RabbitMQ package (deb)
|
||||
shell: |
|
||||
dpkg -l | grep rabbitmq-server
|
||||
shell: "dpkg -l | grep rabbitmq-server"
|
||||
failed_when: false
|
||||
register: installed_rabbitmq_deb
|
||||
when:
|
||||
@ -33,8 +32,9 @@
|
||||
# so we skip this task in the ansible-lint check by using the
|
||||
# 'skip_ansible_lint' tag
|
||||
- name: Get version of installed RabbitMQ package (rpm)
|
||||
shell: |
|
||||
rpm -qa | grep rabbitmq-server
|
||||
shell: "rpm -qa | grep rabbitmq-server"
|
||||
args:
|
||||
warn: no
|
||||
failed_when: false
|
||||
register: installed_rabbitmq_rpm
|
||||
when:
|
||||
@ -48,7 +48,9 @@
|
||||
- name: Register a fact for the installed RabbitMQ version
|
||||
set_fact:
|
||||
installed_rabbitmq: "{{ item }}"
|
||||
when: not item | skipped and item | changed
|
||||
when:
|
||||
- not item | skipped
|
||||
- item | changed
|
||||
with_items:
|
||||
- "{{ installed_rabbitmq_deb }}"
|
||||
- "{{ installed_rabbitmq_rpm }}"
|
||||
|
Loading…
Reference in New Issue
Block a user