data disk
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 2m52s Details

This commit is contained in:
Gleb Koval 2023-09-25 23:23:58 +01:00
parent 2bba6dfa85
commit e1c0eb6265
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
2 changed files with 33 additions and 4 deletions

View File

@ -77,16 +77,22 @@
community.general.proxmox_kvm: community.general.proxmox_kvm:
state: started state: started
register: start 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: ansible.builtin.wait_for:
timeout: 180 timeout: 60
# VM Configuration # VM Configuration
- name: Resize disk - name: Resize root disk
community.general.proxmox_disk: community.general.proxmox_disk:
disk: scsi0 disk: scsi0
size: 64G size: 16G
state: resized state: resized
- name: Create data disk
community.general.proxmox_disk:
disk: scsi1
backup: true
storage: nvme
size: 2048G
- name: Update VM - name: Update VM
community.general.proxmox_kvm: community.general.proxmox_kvm:
update: true update: true

View File

@ -16,3 +16,26 @@
state: started state: started
enabled: true enabled: true
become: 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