forked from hornjason/ansible-ocp-azure
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathscale_azure_ocp.yml
63 lines (53 loc) · 1.5 KB
/
scale_azure_ocp.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
- hosts: localhost
roles:
- { role: azure_cloud_provider }
- hosts: localhost
roles:
- { role: azure_add_new_nodes }
- hosts: localhost
tasks:
- name: Azure | template ansible hosts
template:
src: hosts_ocp_scale_pre.j2
dest: hosts
backup: yes
- hosts: localhost
tasks:
- name: Azure | refresh inventoy
meta: refresh_inventory
# The Azure VMs are provisioned asynchronously. It can take some time
# until they are reachable via SSH, even after Azure reports that the
# provisioning state is "Succeeded".
- hosts: new_nodes
gather_facts: no
tasks:
- name: Wait for nodes to become reachable via SSH
wait_for_connection:
sleep: 30
timeout: 1200
connect_timeout: 10
- hosts: new_nodes
roles:
- { role: ocp_pre }
- name: call openshift scaleup play for scaling infra/app nodes
import_playbook: /usr/share/ansible/openshift-ansible/playbooks/openshift-node/scaleup.yml
when:
- new_infra_nodes or new_app_nodes
- name: call openshift scaleup master playbook for scaling master nodes
import_playbook: /usr/share/ansible/openshift-ansible/playbooks/openshift-master/scaleup.yml
when: new_master_nodes
- hosts: new_nodes
roles:
- { role: ocp_post }
- hosts: localhost
tasks:
- name: Azure | template ansible hosts
template:
src: hosts_ocp_scale_post.j2
dest: hosts
backup: yes
- hosts: localhost
tasks:
- name: Azure | refresh inventoy
meta: refresh_inventory