summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted/tasks/registry/firewall.yml
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-08-31 18:01:56 -0400
committerMichael Gugino <mgugino@redhat.com>2017-09-25 09:40:01 -0400
commit82d61ae9e23c2ae1f722ed3b458a6e39721e71fd (patch)
tree54b79f1033aa3d210597e285e1346239ce7fad86 /roles/openshift_hosted/tasks/registry/firewall.yml
parentc390d382a2c1783964179490eec810ee2206fa32 (diff)
downloadopenshift-82d61ae9e23c2ae1f722ed3b458a6e39721e71fd.tar.gz
openshift-82d61ae9e23c2ae1f722ed3b458a6e39721e71fd.tar.bz2
openshift-82d61ae9e23c2ae1f722ed3b458a6e39721e71fd.tar.xz
openshift-82d61ae9e23c2ae1f722ed3b458a6e39721e71fd.zip
Refactor openshift_hosted plays and role
Currently, openshift_hosted role duplicates some logic across separate task chains. This commit cleans up the openshift_hosted role and converts it to be primarily used with include_role to give better logic to the playbooks that utilize this role. This commit also refactors the playbook that calls various openshift_hosted roles into individual playbooks. This allows more granularity for advanced users.
Diffstat (limited to 'roles/openshift_hosted/tasks/registry/firewall.yml')
-rw-r--r--roles/openshift_hosted/tasks/registry/firewall.yml40
1 files changed, 0 insertions, 40 deletions
diff --git a/roles/openshift_hosted/tasks/registry/firewall.yml b/roles/openshift_hosted/tasks/registry/firewall.yml
deleted file mode 100644
index 775b7d6d7..000000000
--- a/roles/openshift_hosted/tasks/registry/firewall.yml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- when: r_openshift_hosted_registry_firewall_enabled | bool and not r_openshift_hosted_registry_use_firewalld | bool
- block:
- - name: Add iptables allow rules
- os_firewall_manage_iptables:
- name: "{{ item.service }}"
- action: add
- protocol: "{{ item.port.split('/')[1] }}"
- port: "{{ item.port.split('/')[0] }}"
- when: item.cond | default(True)
- with_items: "{{ r_openshift_hosted_registry_os_firewall_allow }}"
-
- - name: Remove iptables rules
- os_firewall_manage_iptables:
- name: "{{ item.service }}"
- action: remove
- protocol: "{{ item.port.split('/')[1] }}"
- port: "{{ item.port.split('/')[0] }}"
- when: item.cond | default(True)
- with_items: "{{ r_openshift_hosted_registry_os_firewall_deny }}"
-
-- when: r_openshift_hosted_registry_firewall_enabled | bool and r_openshift_hosted_registry_use_firewalld | bool
- block:
- - name: Add firewalld allow rules
- firewalld:
- port: "{{ item.port }}"
- permanent: true
- immediate: true
- state: enabled
- when: item.cond | default(True)
- with_items: "{{ r_openshift_hosted_registry_os_firewall_allow }}"
-
- - name: Remove firewalld allow rules
- firewalld:
- port: "{{ item.port }}"
- permanent: true
- immediate: true
- state: disabled
- when: item.cond | default(True)
- with_items: "{{ r_openshift_hosted_registry_os_firewall_deny }}"