You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
494 B
YAML
24 lines
494 B
YAML
2 years ago
|
---
|
||
|
|
||
|
- name: Partition disk
|
||
|
community.general.parted:
|
||
|
device: "{{ disk.device }}"
|
||
|
label: gpt
|
||
|
number: 1
|
||
|
name: "{{ disk.name }}"
|
||
|
fs_type: "{{ disk.format }}"
|
||
|
state: present
|
||
|
register: register_partition
|
||
|
|
||
|
- name: Create filesystem
|
||
|
community.general.filesystem:
|
||
|
dev: "{{ disk.device }}1"
|
||
|
fstype: "{{ disk.format }}"
|
||
|
|
||
|
- name: Mount disk
|
||
|
mount:
|
||
|
src: "{{ disk.device }}1"
|
||
|
path: "{{ disk.mount_point }}"
|
||
|
fstype: "{{ disk.format }}"
|
||
|
state: mounted
|