From 7e0c346c8406eb6142e8d38fdec4e13236f3cdc6 Mon Sep 17 00:00:00 2001
From: Russell Teague <rteague@redhat.com>
Date: Wed, 16 Nov 2016 16:30:28 -0500
Subject: Refactor to use Ansible package module

The Ansible package module will call the correct package manager for the
underlying OS.
---
 playbooks/adhoc/uninstall.yml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'playbooks/adhoc')

diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index 4ea639cbe..be1070f73 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -84,7 +84,7 @@
     - firewalld
 
   - name: Remove packages
-    action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+    package: name={{ item }} state=absent
     when: not is_atomic | bool
     with_items:
     - atomic-enterprise
@@ -114,7 +114,7 @@
     - tuned-profiles-origin-node
 
   - name: Remove flannel package
-    action: "{{ ansible_pkg_mgr }} name=flannel state=absent"
+    package: name=flannel state=absent
     when: openshift_use_flannel | default(false) | bool and not is_atomic | bool
 
   - shell: systemctl reset-failed
@@ -247,7 +247,7 @@
     - atomic-openshift-master
 
   - name: Remove packages
-    action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+    package: name={{ item }} state=absent
     when: not is_atomic | bool
     with_items:
     - atomic-enterprise
@@ -349,7 +349,7 @@
     failed_when: false
 
   - name: Remove packages
-    action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+    package: name={{ item }} state=absent
     when: not is_atomic | bool
     with_items:
     - etcd
@@ -388,7 +388,7 @@
     - firewalld
 
   - name: Remove packages
-    action: "{{ ansible_pkg_mgr }} name={{ item }} state=absent"
+    package: name={{ item }} state=absent
     when: not is_atomic | bool
     with_items:
     - haproxy
-- 
cgit v1.2.3