52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
---
|
|
- 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'] }}"
|