Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| $disks = Get-Disk | Where partitionstyle -eq 'raw' | sort number | |
| $letters = 70..89 | ForEach-Object { [char]$_ } | |
| $count = 0 | |
| $labels = "data1","data2" | |
| foreach ($disk in $disks) { | |
| $driveLetter = $letters[$count].ToString() | |
| $disk | | |
| Initialize-Disk -PartitionStyle MBR -PassThru | | 
| #Requires -Version 3.0 | |
| # Configure a Windows host for remote management with Ansible | |
| # ----------------------------------------------------------- | |
| # | |
| # This script checks the current WinRM (PS Remoting) configuration and makes | |
| # the necessary changes to allow Ansible to connect, authenticate and | |
| # execute PowerShell commands. | |
| # | |
| # All events are logged to the Windows EventLog, useful for unattended runs. | 
| #!/bin/bash | |
| # An set of disks to ignore from partitioning and formatting | |
| BLACKLIST="/dev/sda|/dev/sdb" | |
| # Base directory to hold the data* files | |
| DATA_BASE="/media" | |
| usage() { | |
| echo "Usage: $(basename $0) <new disk>" | |
| } |