mirror of https://github.com/ceph/ceph-ansible.git
Suppress yum/dnf/rpm command warnings
Ansible throws warnings when using yum/dnf/rpm with the command module: [WARNING]: Consider using yum module rather than running yum This patch adds the `warn: no` argument to suppress the warnings in the Ansible output.pull/2038/head
parent
002b0341d0
commit
33b200d43a
|
@ -610,6 +610,8 @@
|
|||
|
||||
- name: remove package dependencies on redhat
|
||||
command: yum -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
when:
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "yum" and
|
||||
|
@ -617,6 +619,8 @@
|
|||
|
||||
- name: remove package dependencies on redhat again
|
||||
command: yum -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
when:
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "yum" and
|
||||
|
@ -624,6 +628,8 @@
|
|||
|
||||
- name: remove package dependencies on redhat
|
||||
command: dnf -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
when:
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "dnf" and
|
||||
|
@ -631,6 +637,8 @@
|
|||
|
||||
- name: remove package dependencies on redhat again
|
||||
command: dnf -y autoremove
|
||||
args:
|
||||
warn: no
|
||||
when:
|
||||
ansible_os_family == 'RedHat' and
|
||||
ansible_pkg_mgr == "dnf" and
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: check ntp installation on atomic
|
||||
command: rpm -q chrony
|
||||
args:
|
||||
warn: no
|
||||
register: ntp_pkg_query
|
||||
ignore_errors: true
|
||||
always_run: true
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: check ntp installation on redhat
|
||||
command: rpm -q ntp
|
||||
args:
|
||||
warn: no
|
||||
register: ntp_pkg_query
|
||||
ignore_errors: true
|
||||
always_run: true
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
# Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version
|
||||
- name: purge yum cache
|
||||
command: yum clean all
|
||||
args:
|
||||
warn: no
|
||||
changed_when: false
|
||||
when:
|
||||
ansible_pkg_mgr == 'yum'
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: check ntp installation on atomic
|
||||
command: rpm -q chrony
|
||||
args:
|
||||
warn: no
|
||||
register: ntp_pkg_query
|
||||
ignore_errors: true
|
||||
always_run: true
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: check ntp installation on redhat
|
||||
command: rpm -q ntp
|
||||
args:
|
||||
warn: no
|
||||
register: ntp_pkg_query
|
||||
ignore_errors: true
|
||||
always_run: true
|
||||
|
|
Loading…
Reference in New Issue