forked from redhat-partner-solutions/crucible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_day2_workers.yml
38 lines (32 loc) · 1.38 KB
/
deploy_day2_workers.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
---
- name: Validate inventory
ansible.builtin.import_playbook: playbooks/validate_inventory.yml
- name: Create VMs
import_playbook: playbooks/create_vms.yml
when: groups['day2_workers'] | default([]) | length > 0
vars:
nodes_to_process: "{{ groups['day2_workers'] | default([]) }}"
# DELETE_VM_BRIDGE is set to false because removing the bridge
# and vlan interface (if shared with the main cluster) will
# break the connection to the cluster that the day 2 nodes
# are trying to join
DELETE_VM_BRIDGE: false
- name: Create Day 2 cluster instance
ansible.builtin.import_playbook: playbooks/create_day2_cluster.yml
- name: Generate Day 2 discovery iso
ansible.builtin.import_playbook: playbooks/generate_discovery_iso.yml
when: groups['day2_workers'] | default([]) | length > 0
vars:
discovery_iso_name: "{{ day2_discovery_iso_name }}"
iso_cluster_id: "{{ add_host_cluster_id }}"
- name: Boot Day 2 ISO
import_playbook: playbooks/boot_iso.yml
when: groups['day2_workers'] | default([]) | length > 0
vars:
discovery_iso_name: "{{ day2_discovery_iso_name }}"
boot_iso_url: "{{ discovery_iso_server }}/{{ day2_discovery_iso_name }}"
boot_iso_hosts: day2_workers
- name: Add day 2 nodes to cluster
ansible.builtin.import_playbook: playbooks/add_day2_nodes.yml
- name: Approve node CSRs
ansible.builtin.import_playbook: playbooks/approve_csrs.yml