62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
|
|
---
|
||
|
|
- hosts: localhost
|
||
|
|
gather_facts: false
|
||
|
|
become: false
|
||
|
|
roles:
|
||
|
|
- get_cloud-init_image
|
||
|
|
- proxmox_upload
|
||
|
|
- proxmox_node_provision
|
||
|
|
|
||
|
|
- hosts: control,worker
|
||
|
|
gather_facts: false
|
||
|
|
become: false
|
||
|
|
vars:
|
||
|
|
role_action: wait
|
||
|
|
strategy: free # 'strategy: free' runs parallel roles against all hosts, 'serial: 1' can be used to control how many hosts actioned in parallel
|
||
|
|
roles:
|
||
|
|
- wait_for_nodes
|
||
|
|
|
||
|
|
- hosts: localhost
|
||
|
|
gather_facts: false
|
||
|
|
become: false
|
||
|
|
vars:
|
||
|
|
role_action: check
|
||
|
|
roles:
|
||
|
|
- wait_for_nodes
|
||
|
|
|
||
|
|
# these certificates arent used for the kubernetes cluster (generates its own with this basic install), just services that run on kubernetes (registry service)
|
||
|
|
# certificates generated before installing kubernetes so we dont have to do a docker restart to activate cert store on a running cluster (k8s gotcha)
|
||
|
|
- hosts: "{{ groups['control'][0] }}"
|
||
|
|
gather_facts: false
|
||
|
|
become: true
|
||
|
|
roles:
|
||
|
|
- generate_certificates
|
||
|
|
|
||
|
|
- hosts: control
|
||
|
|
gather_facts: false
|
||
|
|
become: true
|
||
|
|
roles:
|
||
|
|
- k8s_control_init
|
||
|
|
|
||
|
|
- hosts: worker
|
||
|
|
gather_facts: false
|
||
|
|
become: true
|
||
|
|
roles:
|
||
|
|
- k8s_worker_init
|
||
|
|
|
||
|
|
- hosts: "{{ groups['control'][0] }}"
|
||
|
|
gather_facts: false
|
||
|
|
become: true
|
||
|
|
become_user: "{{ node_account }}"
|
||
|
|
roles:
|
||
|
|
- k8s_metallb
|
||
|
|
- k8s_registry
|
||
|
|
- k8s_dhcp
|
||
|
|
- k8s_dashboard
|
||
|
|
|
||
|
|
- hosts: localhost
|
||
|
|
gather_facts: false
|
||
|
|
become: false
|
||
|
|
roles:
|
||
|
|
- proxmox_farm_provision
|