--- - setup: gather_subset: "!all" - name: debian include: debian.yml when: ansible_os_family == "Debian" #- include: gdisk.yml - name: write partition table command: parted --script {{ item.device }} -- {{ lookup('template','parted_args.j2') }} with_items: "{{ hard_disks }}" - name: sync command: sync - name: reread partition tables command: hdparm -z {{ item.device }} with_items: "{{ hard_disks }}"