From e7ed329bd81c2273c03e94c93c9ce9c1d01cdc86 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 1 Apr 2017 04:53:28 +0200 Subject: Initial import --- playbooks/openshift-setup.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 playbooks/openshift-setup.yml (limited to 'playbooks/openshift-setup.yml') diff --git a/playbooks/openshift-setup.yml b/playbooks/openshift-setup.yml new file mode 100644 index 0000000..4b98f39 --- /dev/null +++ b/playbooks/openshift-setup.yml @@ -0,0 +1,34 @@ +- name: Common setup procedures + hosts: ands + 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: Various OpenShift resources + hosts: nodes + roles: + - role: ands_openshift + +- 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)) + + +- name: OpenVPN service + hosts: nodes + roles: + - role: openvpn + vars: + openvpn_config: "katrin" + openvpn_lb: "{{ ands_openshift_lb }}" + openvpn_servers: "masters" -- cgit v1.2.3