diff options
author | Jhon Honce <jhonce@redhat.com> | 2015-04-07 09:32:46 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2015-04-07 09:32:46 -0700 |
commit | 675f6165a83b86c1a498c327161f928d218ee244 (patch) | |
tree | 0ad271a03feac6bde2a296e6011498cd6455fa99 /roles/os_firewall | |
parent | 59e69dd21c19bf745392b5e83bd652630ee870cc (diff) | |
parent | 8a4888ad30ce7c5898caac47614da2e13a759320 (diff) | |
download | openshift-675f6165a83b86c1a498c327161f928d218ee244.tar.gz openshift-675f6165a83b86c1a498c327161f928d218ee244.tar.bz2 openshift-675f6165a83b86c1a498c327161f928d218ee244.tar.xz openshift-675f6165a83b86c1a498c327161f928d218ee244.zip |
Merge pull request #121 from detiber/nodeRegistrationChangesMaster
Node registration changes master
Diffstat (limited to 'roles/os_firewall')
-rwxr-xr-x[-rw-r--r--] | roles/os_firewall/library/os_firewall_manage_iptables.py | 1 | ||||
-rw-r--r-- | roles/os_firewall/meta/main.yml | 1 | ||||
-rw-r--r-- | roles/os_firewall/tasks/firewall/firewalld.yml | 5 | ||||
-rw-r--r-- | roles/os_firewall/tasks/firewall/iptables.yml | 12 |
4 files changed, 14 insertions, 5 deletions
diff --git a/roles/os_firewall/library/os_firewall_manage_iptables.py b/roles/os_firewall/library/os_firewall_manage_iptables.py index 6a018d022..90588d2ae 100644..100755 --- a/roles/os_firewall/library/os_firewall_manage_iptables.py +++ b/roles/os_firewall/library/os_firewall_manage_iptables.py @@ -1,5 +1,6 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# vim: expandtab:tabstop=4:shiftwidth=4 from subprocess import call, check_output diff --git a/roles/os_firewall/meta/main.yml b/roles/os_firewall/meta/main.yml index 7a8cef6c5..8592371e8 100644 --- a/roles/os_firewall/meta/main.yml +++ b/roles/os_firewall/meta/main.yml @@ -1,3 +1,4 @@ +--- galaxy_info: author: Jason DeTiberus description: os_firewall diff --git a/roles/os_firewall/tasks/firewall/firewalld.yml b/roles/os_firewall/tasks/firewall/firewalld.yml index 469cfab6f..b6bddd5c5 100644 --- a/roles/os_firewall/tasks/firewall/firewalld.yml +++ b/roles/os_firewall/tasks/firewall/firewalld.yml @@ -3,6 +3,7 @@ yum: name: firewalld state: present + register: install_result - name: Check if iptables-services is installed command: rpm -q iptables-services @@ -20,6 +21,10 @@ - ip6tables when: pkg_check.rc == 0 +- name: Reload systemd units + command: systemctl daemon-reload + when: install_result | changed + - name: Start and enable firewalld service service: name: firewalld diff --git a/roles/os_firewall/tasks/firewall/iptables.yml b/roles/os_firewall/tasks/firewall/iptables.yml index 87e77c083..7b5c00a9b 100644 --- a/roles/os_firewall/tasks/firewall/iptables.yml +++ b/roles/os_firewall/tasks/firewall/iptables.yml @@ -6,6 +6,7 @@ with_items: - iptables - iptables-services + register: install_result - name: Check if firewalld is installed command: rpm -q firewalld @@ -20,14 +21,15 @@ enabled: no when: pkg_check.rc == 0 -- name: Start and enable iptables services +- name: Reload systemd units + command: systemctl daemon-reload + when: install_result | changed + +- name: Start and enable iptables service service: - name: "{{ item }}" + name: iptables state: started enabled: yes - with_items: - - iptables - - ip6tables register: result - name: need to pause here, otherwise the iptables service starting can sometimes cause ssh to fail |