Cloud VM #7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue