1234567891011121314151617181920212223242526272829303132333435 |
- ---
- - name: Ensure firewalld service is not enabled
- systemd:
- name: firewalld
- state: stopped
- enabled: no
- masked: yes
- register: task_result
- failed_when: task_result|failed and 'could not' not in task_result.msg|lower
- - name: Wait 10 seconds after disabling firewalld
- pause:
- seconds: 10
- when: task_result | changed
- - name: Install iptables packages
- package: name={{ item }} state=present
- with_items:
- - iptables
- - iptables-services
- when: not openshift.common.is_atomic | bool
- - name: Start and enable iptables service
- systemd:
- name: iptables
- state: started
- enabled: yes
- masked: no
- daemon_reload: yes
- register: result
- - name: need to pause here, otherwise the iptables service starting can sometimes cause ssh to fail
- pause: seconds=10
- when: result | changed
|