refresh cluster
This commit is contained in:
parent
2e6f295a27
commit
9caedb36fd
2
build-cluster/airgap/.gitignore
vendored
Normal file
2
build-cluster/airgap/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
33
build-cluster/deprovision.yaml
Normal file
33
build-cluster/deprovision.yaml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
- name: Deprovision cluster
|
||||||
|
hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
- community.general.proxmox_kvm:
|
||||||
|
api_host: "{{ proxmox_api_host }}"
|
||||||
|
api_user: "{{ lookup('env','PM_USER') }}"
|
||||||
|
api_password: "{{ lookup('env','PM_PASSWORD') }}"
|
||||||
|
name: "{{ item }}"
|
||||||
|
node: "{{ hostvars[item].node }}"
|
||||||
|
vmid: "{{ hostvars[item].id }}"
|
||||||
|
state: stopped
|
||||||
|
force: yes
|
||||||
|
timeout: 500
|
||||||
|
with_inventory_hostnames:
|
||||||
|
- primary
|
||||||
|
- control_plane
|
||||||
|
- workers
|
||||||
|
- community.general.proxmox_kvm:
|
||||||
|
api_host: "{{ proxmox_api_host }}"
|
||||||
|
api_user: "{{ lookup('env','PM_USER') }}"
|
||||||
|
api_password: "{{ lookup('env','PM_PASSWORD') }}"
|
||||||
|
name: "{{ item }}"
|
||||||
|
node: "{{ hostvars[item].node }}"
|
||||||
|
vmid: "{{ hostvars[item].id }}"
|
||||||
|
state: absent
|
||||||
|
force: yes
|
||||||
|
timeout: 500
|
||||||
|
with_inventory_hostnames:
|
||||||
|
- primary
|
||||||
|
- control_plane
|
||||||
|
- workers
|
||||||
@ -1,7 +1,7 @@
|
|||||||
all:
|
all:
|
||||||
vars:
|
vars:
|
||||||
cp_fqdn: nc_cp.home.thejimnicholson.com
|
cp_fqdn: nc_cp.home.thejimnicholson.com
|
||||||
proxmox_api: pve.home.thejimnicholson.com
|
proxmox_api_host: pve.home.thejimnicholson.com
|
||||||
pdns_api: 10.0.96.30
|
pdns_api: 10.0.96.30
|
||||||
pdns_dom: home.thejimnicholson.com
|
pdns_dom: home.thejimnicholson.com
|
||||||
cloudinit_img: centos-8-cloudimg
|
cloudinit_img: centos-8-cloudimg
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
disabled: false
|
disabled: false
|
||||||
body_format: json
|
body_format: json
|
||||||
headers:
|
headers:
|
||||||
'X-API-Key': '{{ lookup('env','PDNS_API_PW') }}'
|
'X-API-Key': "{{ lookup('env','PDNS_API_PW') }}"
|
||||||
return_content: yes
|
return_content: yes
|
||||||
status_code:
|
status_code:
|
||||||
- 200
|
- 200
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
airgap_install: false
|
||||||
|
airgap_opts: "INSTALL_K3S_SKIP_DOWNLOAD=true INSTALL_K3S_SKIP_SELINUX_RPM=true"
|
||||||
|
# Whether to use registry proxies or preload container images
|
||||||
|
airgap_method: "registry" # or "image"
|
||||||
|
# Location of airgap components (see https://rancher.com/docs/k3s/latest/en/installation/airgap/)
|
||||||
|
airgap_preseed_url: https://www.example.com/k3s_airgap/
|
||||||
@ -22,3 +22,8 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
become: true
|
||||||
when: nm_update.changed
|
when: nm_update.changed
|
||||||
|
- name: Airgap optional tasks
|
||||||
|
block:
|
||||||
|
- debug:
|
||||||
|
msg: "Airgap tasks go here"
|
||||||
|
when: airgap_install
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user