1#!/usr/local/bin/python3.8
2
3# Copyright: (c) 2019, Brant Evans <bevans@redhat.com>
4# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6DOCUMENTATION = '''
7---
8module: win_initialize_disk
9short_description: Initializes disks on Windows Server
10description:
11    - "The M(community.windows.win_initialize_disk) module initializes disks"
12options:
13    disk_number:
14        description:
15            - Used to specify the disk number of the disk to be initialized.
16        type: int
17    uniqueid:
18        description:
19            - Used to specify the uniqueid of the disk to be initialized.
20        type: str
21    path:
22        description:
23            - Used to specify the path to the disk to be initialized.
24        type: str
25    style:
26        description:
27            - The partition style to use for the disk. Valid options are mbr or gpt.
28        type: str
29        choices: [ gpt, mbr ]
30        default: gpt
31    online:
32        description:
33            - If the disk is offline and/or readonly update the disk to be online and not readonly.
34        type: bool
35        default: true
36    force:
37        description:
38            - Specify if initializing should be forced for disks that are already initialized.
39        type: bool
40        default: no
41
42notes:
43    - One of three parameters (I(disk_number), I(uniqueid), and I(path)) are mandatory to identify the target disk, but
44      more than one cannot be specified at the same time.
45    - A minimum Operating System Version of Server 2012 or Windows 8 is required to use this module.
46    - This module is idempotent if I(force) is not specified.
47
48seealso:
49    - module: community.windows.win_disk_facts
50    - module: community.windows.win_partition
51    - module: community.windows.win_format
52
53author:
54    - Brant Evans (@branic)
55'''
56
57EXAMPLES = '''
58- name: Initialize a disk
59  community.windows.win_initialize_disk:
60    disk_number: 1
61
62- name: Initialize a disk with an MBR partition style
63  community.windows.win_initialize_disk:
64    disk_number: 1
65    style: mbr
66
67- name: Forcefully initiallize a disk
68  community.windows.win_initialize_disk:
69    disk_number: 2
70    force: yes
71'''
72
73RETURN = '''
74#
75'''
76