You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 line
760B

  1. ---
  2. - setup:
  3. gather_subset: "!all"
  4. - include: setup_Debian.yml
  5. when: ansible_os_family == "Debian"
  6. - name: write partition table
  7. command:
  8. parted --script
  9. {{ item.device }}
  10. -- mklabel {{ item.label_type }}
  11. with_items: "{{ hard_disks }}"
  12. - name: create partitions
  13. command:
  14. parted --script
  15. {{ item.0.device }}
  16. -- {{ lookup('template','parted_partitions_args.j2') }}
  17. with_subelements:
  18. - "{{ hard_disks }}"
  19. - partitions
  20. - name: set flags
  21. command:
  22. parted --script
  23. {{ item.device }}
  24. -- {{ lookup('template','parted_flags_args.j2') }}
  25. with_items: "{{ hard_disks }}"
  26. - name: sync
  27. command: sync
  28. - name: reread partition tables
  29. command: partprobe {{ item.device }}
  30. with_items: "{{ hard_disks }}"