Skip to content

Instantly share code, notes, and snippets.

@nikhilsingnurkar
nikhilsingnurkar / ansible-summary.md
Created February 28, 2019 04:41 — forked from AdamOssenford/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@nikhilsingnurkar
nikhilsingnurkar / addDiskAzureWindows.ps1
Last active January 9, 2019 04:17
Initialize,partitation,format disk on Azure windows VM
$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 |
@nikhilsingnurkar
nikhilsingnurkar / ConfigureRemotingForAnsible.ps1
Created January 8, 2019 05:29
Configure a Windows host for remote management with Ansible
#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.
@nikhilsingnurkar
nikhilsingnurkar / autopart.sh
Last active January 7, 2019 04:42 — forked from trentmswanson/autopart.sh
Linux bash script to partition and format all data disks in azure
#!/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>"
}