Skip to content

Latest commit

 

History

History
196 lines (158 loc) · 9.92 KB

community.windows.win_initialize_disk_module.rst

File metadata and controls

196 lines (158 loc) · 9.92 KB

community.windows.win_initialize_disk

Initializes disks on Windows Server

Parameter Choices/Defaults Comments
disk_number
integer
Used to specify the disk number of the disk to be initialized.
force
boolean
    Choices:
  • no
  • yes
Specify if initializing should be forced for disks that are already initialized.
online
boolean
    Choices:
  • no
  • yes ←
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
    Choices:
  • gpt ←
  • mbr
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

  • One of three parameters (disk_number, uniqueid, and path) are mandatory to identify the target disk, but more than one cannot be specified at the same time.
  • A minimum Operating System Version of Server 2012 or Windows 8 is required to use this module.
  • This module is idempotent if force is not specified.
.. seealso::

   :ref:`community.windows.win_disk_facts_module`
      The official documentation on the **community.windows.win_disk_facts** module.
   :ref:`community.windows.win_partition_module`
      The official documentation on the **community.windows.win_partition** module.
   :ref:`community.windows.win_format_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

Authors

  • Brant Evans (@branic)