--- - name: setup disks on storage nodes delegate_to: "{{ node }}" delegate_facts: true block: - name: ensure parted is installed community.general.pacman: name: parted state: latest update_cache: false when: - ansible_os_family == 'Archlinux' - name: create containerd image partition community.general.parted: device: "{{ item.disk }}" align: optimal name: "{{ item.part }}" label: gpt number: 1 part_start: 0% part_end: 100% state: present fs_type: ext4 with_items: - disk: /dev/vdc part: ebs-ssd - disk: /dev/vdd part: ebs-hdd - name: create containerd partition filesystem community.general.filesystem: dev: "{{ item }}" fstype: ext4 resizefs: true state: present with_items: - /dev/disk/by-partlabel/ebs-ssd - /dev/disk/by-partlabel/ebs-hdd - name: mount ebs disks ansible.posix.mount: state: mounted src: "{{ item.src }}" path: "{{ item.path }}" fstype: ext4 boot: true with_items: - src: /dev/disk/by-partlabel/ebs-ssd path: /ebs/ssd - src: /dev/disk/by-partlabel/ebs-hdd path: /ebs/hdd