Note
This plugin is part of the community.windows collection (version 1.7.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.windows
.
To use it in a playbook, specify: community.windows.win_initialize_disk
.
Parameter | Choices/Defaults | Comments |
---|---|---|
disk_number integer | Used to specify the disk number of the disk to be initialized. | |
force boolean |
| Specify if initializing should be forced for disks that are already initialized. |
online boolean |
| If the disk is offline and/or readonly update the disk to be online and not readonly. |
path string | Used to specify the path to the disk to be initialized. | |
style string |
| The partition style to use for the disk. Valid options are mbr or gpt. |
uniqueid string | Used to specify the uniqueid of the disk to be initialized. |
Note
See also
The official documentation on the community.windows.win_disk_facts module.
The official documentation on the community.windows.win_partition module.
The official documentation on the community.windows.win_format module.
- name: Initialize a disk community.windows.win_initialize_disk: disk_number: 1 - name: Initialize a disk with an MBR partition style community.windows.win_initialize_disk: disk_number: 1 style: mbr - name: Forcefully initiallize a disk community.windows.win_initialize_disk: disk_number: 2 force: yes
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/windows/win_initialize_disk_module.html