summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-install.yml
blob: f3a81ea9bd4712ae329301d14160c3a696530e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- name: Configure cluster hosts names 
  hosts: nodes
  roles:
    - { role: ands_facts }
    - { role: ands_openshift, subrole: hostnames }

- 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'] }}"

- import_playbook: ../anslib/openshift-ansible/playbooks/prerequisites.yml

#- include: ../anslib/openshift-ansible/playbooks/byo/config.yml
#- include: ../anslib/openshift-ansible/playbooks/deploy_cluster.yml
- import_playbook: ../anslib/openshift-ansible/playbooks/deploy_cluster.yml
#- import_playbook: openshift-deploy-cluster.yml

- 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))