From e4751f88e52aa8e89e4c94bc6fe4c3346eccf6fe Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 20 Feb 2018 15:10:45 +0100 Subject: Handling GlusterFS storage security in OpenShift containers --- playbooks/openshift-setup-security.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 playbooks/openshift-setup-security.yml (limited to 'playbooks/openshift-setup-security.yml') diff --git a/playbooks/openshift-setup-security.yml b/playbooks/openshift-setup-security.yml new file mode 100644 index 0000000..6c85602 --- /dev/null +++ b/playbooks/openshift-setup-security.yml @@ -0,0 +1,24 @@ +- name: Configure users + hosts: masters + roles: + - { role: ands_facts } + + +- name: Temporary provision /etc/hosts with Masters IP. + hosts: nodes:!masters + tasks: + - lineinfile: dest="/etc/hosts" line="{{ ands_openshift_network | ipaddr(node_id) | ipaddr('address') }} {{ ands_openshift_lb }}" regexp=".*{{ ands_openshift_lb }}$" state="present" + when: (ands_provision_without_dns | default(false)) + vars: + node_id: "{{ hostvars[groups['masters'][0]]['ands_host_id'] }}" + +- name: Configure security + hosts: masters + roles: + - { role: ands_openshift, subrole: security } + +- name: Remove temporary entries in /etc/hosts + hosts: nodes:!masters + tasks: + - lineinfile: dest="/etc/hosts" regexp=".*{{ ands_openshift_lb }}$" state="absent" + when: (ands_provision_without_dns | default(false)) -- cgit v1.2.3