summaryrefslogtreecommitdiffstats
path: root/roles/os_firewall/tasks
diff options
context:
space:
mode:
authorAdam Miller <admiller@redhat.com>2015-11-18 16:19:19 -0600
committerAdam Miller <admiller@redhat.com>2015-12-02 14:55:29 -0600
commitaf009a7a51d7b6f5799a14c452cc7db92727135e (patch)
treeafe2cebb1e98aa52fdf9bc21f03ebdaf4aa27bdc /roles/os_firewall/tasks
parentebf659b0c1775f9be3e52a8ef420d568656c10f9 (diff)
downloadopenshift-af009a7a51d7b6f5799a14c452cc7db92727135e.tar.gz
openshift-af009a7a51d7b6f5799a14c452cc7db92727135e.tar.bz2
openshift-af009a7a51d7b6f5799a14c452cc7db92727135e.tar.xz
openshift-af009a7a51d7b6f5799a14c452cc7db92727135e.zip
Fedora changes:
- ansible bootstrap playbook for Fedora 23+ - add conditionals to handle yum vs dnf - add Fedora OpenShift COPR - update BYO host README for repo configs and fedora bootstrap Fix typo in etcd README, remove unnecessary parens in openshift_node main.yml rebase on master, update package cache refresh handler for yum vs dnf Fix typo in etcd README, remove unnecessary parens in openshift_node main.yml
Diffstat (limited to 'roles/os_firewall/tasks')
-rw-r--r--roles/os_firewall/tasks/firewall/firewalld.yml8
-rw-r--r--roles/os_firewall/tasks/firewall/iptables.yml11
2 files changed, 19 insertions, 0 deletions
diff --git a/roles/os_firewall/tasks/firewall/firewalld.yml b/roles/os_firewall/tasks/firewall/firewalld.yml
index 5089eb3e0..cf2a2c733 100644
--- a/roles/os_firewall/tasks/firewall/firewalld.yml
+++ b/roles/os_firewall/tasks/firewall/firewalld.yml
@@ -3,6 +3,14 @@
yum:
name: firewalld
state: present
+ when: ansible_pkg_mgr == "yum"
+ register: install_result
+
+- name: Install firewalld packages
+ dnf:
+ name: firewalld
+ state: present
+ when: ansible_pkg_mgr == "dnf"
register: install_result
- name: Check if iptables-services is installed
diff --git a/roles/os_firewall/tasks/firewall/iptables.yml b/roles/os_firewall/tasks/firewall/iptables.yml
index 9af9d8d29..36d51504c 100644
--- a/roles/os_firewall/tasks/firewall/iptables.yml
+++ b/roles/os_firewall/tasks/firewall/iptables.yml
@@ -6,6 +6,17 @@
with_items:
- iptables
- iptables-services
+ when: ansible_pkg_mgr == "yum"
+ register: install_result
+
+- name: Install iptables packages
+ dnf:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - iptables
+ - iptables-services
+ when: ansible_pkg_mgr == "dnf"
register: install_result
- name: Check if firewalld is installed