Cloud VM #7

Merged
cyclane merged 35 commits from cloud-vm into main 2023-09-26 19:50:12 +00:00
2 changed files with 33 additions and 4 deletions
Showing only changes of commit e1c0eb6265 - Show all commits

View File

@ -77,16 +77,22 @@
community.general.proxmox_kvm:
state: started
register: start
- name: Wait 3 min # Initial apt update, apt upgrade, cloud-init
- name: Wait 1 min # Initial apt update, apt upgrade, cloud-init
ansible.builtin.wait_for:
timeout: 180
timeout: 60
# VM Configuration
- name: Resize disk
- name: Resize root disk
community.general.proxmox_disk:
disk: scsi0
size: 64G
size: 16G
state: resized
- name: Create data disk
community.general.proxmox_disk:
disk: scsi1
backup: true
storage: nvme
size: 2048G
- name: Update VM
community.general.proxmox_kvm:
update: true

View File

@ -16,3 +16,26 @@
state: started
enabled: true
become: true
- name: Create data partition
community.general.parted:
device: /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:1
label: gpt
name: data
number: 1
fs_type: ext4
state: present
become: true
- name: Mount data partition
ansible.posix.mount:
src: /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:1-part1
path: /mnt/data
fstype: ext4
state: present
become: true
- name: Set data partition permissions
ansible.builtin.file:
path: /mnt/data
owner: debian
group: debian
become: true