No description
  • Jinja 91.9%
  • PowerShell 8.1%
Find a file
semantic-release-bot 20f9e90bfa chore(release): 1.5.0 [skip ci]
# [1.5.0](https://github.com/de-it-krachten/ansible-role-windows_storage/compare/v1.4.0...v1.5.0) (2026-03-15)

### Bug Fixes

* Add partition check to prevent unnecessary actions ([0fc1a14](0fc1a14448))

### Features

* Add support for Windows Server 2025 ([1824653](1824653614))
* Drop support for Fedora 43 ([780a720](780a720a85))
2026-03-15 23:12:54 +00:00
.github/workflows Fix merging conflicts 2026-03-16 00:10:24 +01:00
defaults Improve code readability 2025-03-19 12:04:50 +01:00
files Add deactivated code 2025-12-10 18:34:50 +01:00
meta Update CI 2026-03-07 01:12:47 +01:00
molecule/default Fix merging conflicts 2026-03-16 00:10:24 +01:00
tasks Add deactivated code 2025-12-10 18:34:50 +01:00
.ansible-lint Implement molecule testing using vagrant 2023-10-27 00:49:59 +02:00
.cicd Fix merging conflicts 2026-03-16 00:10:24 +01:00
.cicd.overwrite Update CI 2026-03-07 01:12:47 +01:00
.collections Add deactivated code 2025-12-10 18:34:50 +01:00
.gitignore feat: Update supported platforms & CI 2024-12-29 13:57:02 +01:00
.releaserc.yml Add deactivated code 2025-12-10 18:34:50 +01:00
.roles Implement molecule testing using vagrant 2023-10-27 00:49:59 +02:00
.yamllint feat: Update supported platforms & CI 2024-12-29 13:57:02 +01:00
CHANGELOG.md chore(release): 1.5.0 [skip ci] 2026-03-15 23:12:54 +00:00
README.md Update CI 2026-03-07 01:12:47 +01:00

CI

ansible-role-windows_storage

Initialize Windows storage (disk format)

Note that GPT disks have a reserved partition '1' after initialization

Dependencies

Roles

None

Collections

  • ansible.windows
  • community.windows

Platforms

Supported platforms

  • Windows Server 2012 R21
  • Windows Server 20161
  • Windows Server 20191
  • Windows Server 20221
  • Windows Server 20251

Note: 1 : no automated testing is performed on these platforms

Role Variables

defaults/main.yml


# Show extra information
windows_storage_verbose: false

# Field mapping
windows_storage_fields:
  SATA:
    adapter: SCSIPort
    disk: SCSIBus
  SAS:
    adapter: SCSIPort
    # disk: SCSILogicalUnit  # Azure VMs
    disk: SCSITargetId       # Virtualbox VM's

Example Playbook

molecule/default/converge.yml


- name: sample playbook for role 'windows_storage'
  hosts: all
  become: 'yes'
  vars:
    molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
    windows_storage_disk_layout:
      - type: SATA
        adapter: 0
        disk: 1
        style: gpt
        partitions:
          - drive_letter: X
            file_system: ntfs
            partition_number: 2
            partition_size: 100 MiB
            allocation_unit_size: 8192
          - drive_letter: Y
            file_system: ntfs
            partition_number: 3
            partition_size: 200 MiB
            compress: true
      - type: SATA
        adapter: 0
        disk: 2
        style: mbr
        partitions:
          - drive_letter: Z
            file_system: ntfs
            partition_number: 1
            partition_size: -1
            label: myfulldisk
  roles:
    - deitkrachten.facts
  tasks:
    - name: Include role 'windows_storage'
      ansible.builtin.include_role:
        name: windows_storage