summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-setup-projects.yml
blob: cc36498af4c7418f141d5dc365dfee121d728ebd (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
27
28
29
30
- name: Configure users & user projects
  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 users & user projects
  hosts: masters
  roles:
    - { role: ands_openshift, subrole: users }
    - { role: ands_openshift, subrole: security }
    - { role: ands_openshift, subrole: storage }
    - { role: ands_kaas }
  vars:
    kaas_projects: "{{ ands_openshift_projects.keys() }}"
    kaas_openshift_volumes: "{{ ands_openshift_volumes }}"


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