-
Notifications
You must be signed in to change notification settings - Fork 16
/
ocp_on_osp.yml
43 lines (38 loc) · 1.24 KB
/
ocp_on_osp.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
---
- name: Determine undercloud and allocate inventory
hosts: localhost
gather_facts: false
vars_files:
- vars/shift_stack_vars.yaml
tasks:
- name: Add undercloud host to inventory for each cluster to be created
add_host:
name: "undercloud-{{ item }}"
group: undercloud_host
ansible_host: "{{ undercloud_host }}"
ansible_connection: "ssh"
ansible_user: "{{ undercloud_user }}"
ansible_ssh_pass: "{{ undercloud_password }}"
with_sequence: "start=1 count={{ ocp_cluster_count }} format=%04u"
- hosts: undercloud_host
gather_facts: true
vars_files:
- vars/shift_stack_vars.yaml
tasks:
- name: Get Binaries
include_tasks: tasks/get_ocp_binaries.yml
run_once: true
- name: create flavors
include_tasks: tasks/create_flavors.yml
run_once: true
- name: set masquerade rule
include_tasks: tasks/set_masquerade.yml
run_once: true
when: set_masquerade == true
- name: create openshift cluster(s)
include_tasks: tasks/install_ocp_cluster.yml
- block:
- name: create ocp infra nodes
include_tasks: tasks/create_ocp_infra_nodes.yml
environment:
KUBECONFIG: /home/stack/ocp_clusters/{{ ocp_cluster_name }}/auth/kubeconfig