Ansible role to partition an disk, LV or not, in Linux systems.
Ansible>=2.1
disk_devices: - disk: /dev/nvme0n1 device: /dev/nvme0n1 lv: yes fs_type: ext4 mount_opts: defaults,nobootwait mount_state: mounted mount: /opt/ mount_user: marco mount_group: admin
disk_lvol:
- vg_name: vg_opt
vg_pv: /dev/nvme0n1
lv_dev:
- device: /dev/vg_opt/opt
name: data
size: '100%VG'
force: yes
fs_type: ext4
mount_opts: defaults,nobootwait
mount_state: mounted
mount: /data/
None
- name: Playbook sample to disk partition
hosts: host-test
become: yes
gather_facts: yes
roles:
- disk-part
Chaordic Systems, Cloud Team.