diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-03-01 22:17:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 22:17:22 -0500 |
commit | 2d52f7c89baae452f3012102ac0f22a071f8f4ce (patch) | |
tree | feb36c4dd6e8a04fa14a24d88d36b6dacc0fa213 /roles/contiv/tasks/netplugin_iptables.yml | |
parent | 4a3e61e035e42a260e0bf59d1e0c891dc004d50d (diff) | |
parent | 58818a6af147e457d56a1faf77b02d37bb538826 (diff) | |
download | openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.gz openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.bz2 openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.tar.xz openshift-2d52f7c89baae452f3012102ac0f22a071f8f4ce.zip |
Merge pull request #3393 from srampal/contiv
Pull request for Contiv Ansible code integration into Openshift Ansible
Diffstat (limited to 'roles/contiv/tasks/netplugin_iptables.yml')
-rw-r--r-- | roles/contiv/tasks/netplugin_iptables.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/contiv/tasks/netplugin_iptables.yml b/roles/contiv/tasks/netplugin_iptables.yml new file mode 100644 index 000000000..8c348ac67 --- /dev/null +++ b/roles/contiv/tasks/netplugin_iptables.yml @@ -0,0 +1,29 @@ +--- +- name: Netplugin IPtables | Get iptables rules + command: iptables -L --wait + register: iptablesrules + always_run: yes + +- name: Netplugin IPtables | Enable iptables at boot + service: + name: iptables + enabled: yes + state: started + +- name: Netplugin IPtables | Open Netmaster with iptables + command: /sbin/iptables -I INPUT 1 -p tcp --dport {{ item }} -j ACCEPT -m comment --comment "contiv" + with_items: + - "{{ netmaster_port }}" + - "{{ contiv_rpc_port1 }}" + - "{{ contiv_rpc_port2 }}" + - "{{ contiv_rpc_port3 }}" + - "{{ contiv_etcd_port }}" + - "{{ kube_master_api_port }}" + when: iptablesrules.stdout.find("contiv") == -1 + notify: Save iptables rules + +- name: Netplugin IPtables | Open vxlan port with iptables + command: /sbin/iptables -I INPUT 1 -p udp --dport 8472 -j ACCEPT -m comment --comment "vxlan" + +- name: Netplugin IPtables | Open vxlan port with iptables + command: /sbin/iptables -I INPUT 1 -p udp --dport 4789 -j ACCEPT -m comment --comment "vxlan" |