Skip to content

Commit c88fa5c

Browse files
committed
Fix contiv#326, open the API proxy port
1 parent 59f4f3b commit c88fa5c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Diff for: roles/auth_proxy/defaults/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ auth_proxy_key: "{{ contiv_certs }}/auth_proxy_key.pem"
66
auth_proxy_datastore: "{{ cluster_store }}"
77
auth_proxy_binaries: "/var/contiv_cache"
88
auth_proxy_local_install: False
9+
auth_proxy_rule_comment: "Contiv auth proxy service"

Diff for: roles/auth_proxy/tasks/cleanup.yml

+6
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22

33
- name: stop auth-proxy container
44
service: name=auth-proxy state=stopped
5+
6+
- name: cleanup iptables for auth proxy
7+
shell: iptables -D INPUT -p tcp --dport {{ item }} -j ACCEPT -m comment --comment "{{ auth_proxy_rule_comment }} ({{ item }})"
8+
become: true
9+
with_items:
10+
- "{{ auth_proxy_port }}"

Diff for: roles/auth_proxy/tasks/main.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22
# tasks file for auth_proxy
3+
- name: setup iptables for auth proxy
4+
shell: >
5+
( iptables -L INPUT | grep "{{ auth_proxy_rule_comment }} ({{ item }})" ) || \
6+
iptables -I INPUT 1 -p tcp --dport {{ item }} -j ACCEPT -m comment --comment "{{ auth_proxy_rule_comment }} ({{ item }})"
7+
become: true
8+
with_items:
9+
- "{{ auth_proxy_port }}"
310

411
# Load the auth-proxy-image from local tar. Ignore any errors to handle the
512
# case where the image is not built in

0 commit comments

Comments
 (0)