From 7e0c346c8406eb6142e8d38fdec4e13236f3cdc6 Mon Sep 17 00:00:00 2001 From: Russell Teague 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. --- roles/os_firewall/tasks/firewall/firewalld.yml | 2 +- roles/os_firewall/tasks/firewall/iptables.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/os_firewall/tasks') diff --git a/roles/os_firewall/tasks/firewall/firewalld.yml b/roles/os_firewall/tasks/firewall/firewalld.yml index 5ddca1fc0..a5b733cb7 100644 --- a/roles/os_firewall/tasks/firewall/firewalld.yml +++ b/roles/os_firewall/tasks/firewall/firewalld.yml @@ -1,6 +1,6 @@ --- - name: Install firewalld packages - action: "{{ ansible_pkg_mgr }} name=firewalld state=present" + package: name=firewalld state=present when: not openshift.common.is_containerized | bool register: install_result diff --git a/roles/os_firewall/tasks/firewall/iptables.yml b/roles/os_firewall/tasks/firewall/iptables.yml index 470d4f4f9..366ede8fd 100644 --- a/roles/os_firewall/tasks/firewall/iptables.yml +++ b/roles/os_firewall/tasks/firewall/iptables.yml @@ -25,7 +25,7 @@ ignore_errors: yes - name: Install iptables packages - action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" + package: name={{ item }} state=present with_items: - iptables - iptables-services -- cgit v1.2.3