feat: Buncha shit

This commit is contained in:
Lino Silva
2023-03-25 23:54:00 +00:00
parent fe17c6eb69
commit a43c1593d9
88 changed files with 354 additions and 52 deletions
@@ -0,0 +1,51 @@
---
- name: Create containers
# community.general.proxmox:
# vmid: "{{ hostvars[item]['k3s_vmid'] }}"
# node: "{{ item }}"
# api_user: root@pam
# api_password: "{{ proxmox_api_password }}"
# api_host: 10.0.2.2
# password: "{{ lxc_password }}"
# hostname: "{{ hostvars[item]['k3s_hostname'] }}"
# ostemplate: "hyrule-8tb-nfs:vztmpl/debian-11-standard_11.3-1_amd64.tar.zst"
# netif: "{'net0':'name=eth0,\
# gw=10.0.0.1,\
# ip={{ hostvars[item]['k3s_lxc_host'] }}/21,\
# hwaddr={{ hostvars[item]['k3s_mac_addr'] }},\
# bridge=vmbr0'}"
# cores: "{{ hostvars[item]['k3s_cores'] }}"
# memory: "{{ hostvars[item]['k3s_memory'] }}"
# unprivileged: no
# swap: 0
# searchdomain: "home"
# onboot: 1
# features:
# - nesting=1
# disk: local-lvm:{{ hostvars[item]['k3s_disk'] }}
# force: yes
# loop: "{{ groups['k3s_hosts'] }}"
proxmox_kvm:
api_user: root@pam
api_password: "{{ proxmox_api_password }}"
api_host: 10.0.2.2
name: "{{ hostvars[item]['k3s_hostname'] }}"
node: "{{ item }}"
newid: "{{ hostvars[item]['k3s_vmid'] }}"
clone: debian-10-openstack-amd64
vmid: "{{ hostvars[item]['k3s_template_id'] }}"
timeout: 900
loop: "{{ groups['k3s_hosts'] }}"
- name: Update VMs
proxmox_kvm:
api_user: root@pam
api_password: "{{ proxmox_api_password }}"
api_host: 10.0.2.2
memory: "{{ hostvars[item]['k3s_memory'] }}"
cores: "{{ hostvars[item]['k3s_cores'] }}"
vmid: "{{ hostvars[item]['k3s_vmid'] }}"
node: "{{ item }}"
update: yes
agent: yes
loop: "{{ groups['k3s_hosts'] }}"