Compare commits

..

2 Commits

Author SHA1 Message Date
9caedb36fd refresh cluster 2022-02-17 15:01:46 -08:00
2e6f295a27 Refresh cluster 2022-02-17 15:01:31 -08:00
7 changed files with 52 additions and 3 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.direnv
.envrc

2
build-cluster/airgap/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

View 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

View File

@ -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

View File

@ -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

View File

@ -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/

View File

@ -21,4 +21,9 @@
name: NetworkManager name: NetworkManager
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