]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Suppress yum/dnf/rpm command warnings 2038/head
authorMajor Hayden <major@mhtx.net>
Thu, 12 Oct 2017 13:38:01 +0000 (08:38 -0500)
committerMajor Hayden <major@mhtx.net>
Thu, 12 Oct 2017 13:38:05 +0000 (08:38 -0500)
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.

infrastructure-playbooks/purge-docker-cluster.yml
roles/ceph-common/tasks/checks/check_ntp_atomic.yml
roles/ceph-common/tasks/checks/check_ntp_redhat.yml
roles/ceph-common/tasks/installs/configure_redhat_repository_installation.yml
roles/ceph-docker-common/tasks/checks/check_ntp_atomic.yml
roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml

index 3e301bf6783e9c9d28a4dc235f60d38bc82b43f2..775cd472e968f59d47bbaf8d17417223a24a056c 100644 (file)
 
   - name: remove package dependencies on redhat
     command: yum -y autoremove
+    args:
+      warn: no
     when:
       ansible_os_family == 'RedHat' and
       ansible_pkg_mgr == "yum" and
 
   - 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
 
   - name: remove package dependencies on redhat
     command: dnf -y autoremove
+    args:
+      warn: no
     when:
       ansible_os_family == 'RedHat' and
       ansible_pkg_mgr == "dnf" and
 
   - 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
index 32050835e02235e7e04464a72f2cb24859cada13..548f1765ffd8e20c890c969b1fd95d1a53d7494a 100644 (file)
@@ -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
index 2a957b4553a87dd8da66fc896ac372295e7251e2..1f52296b69a3d2c6700f61c2699b60eb0b1f00c5 100644 (file)
@@ -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
index d63094c7e1b434e4ee36399c257bb6e755c5b07e..74f18bc66345c64d5dea5663a87215d8fddefdf6 100644 (file)
@@ -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'
index 32050835e02235e7e04464a72f2cb24859cada13..548f1765ffd8e20c890c969b1fd95d1a53d7494a 100644 (file)
@@ -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
index 2a957b4553a87dd8da66fc896ac372295e7251e2..1f52296b69a3d2c6700f61c2699b60eb0b1f00c5 100644 (file)
@@ -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