This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Don't be scared, wget is an alias for Invoke-WebRequest | |
wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -Outfile ConfigureRemotingForAnsible.ps1 | |
.\ConfigureRemotingForAnsible.ps1 | |
winrm quickconfig -transport:https |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable-WSManCredSSP -Role Server -Force | |
Set-Item -Path "WSMan:\localhost\Service\Auth\CredSSP" -Value $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Needed for installing SQL Server via Chocolatey in Win2012 | |
- name: Download Hotfixes | |
win_get_url: | |
url: "{{ item.url }}" | |
dest: "C:/{{ item.kb }}.msu" | |
with_items: | |
- { kb: KB2919442, url: "https://download.microsoft.com/download/D/6/0/D60ED3E0-93A5-4505-8F6A-8D0A5DA16C8A/Windows8.1-KB2919442-x64.msu" } | |
- { kb: KB2919355, url: "https://download.microsoft.com/download/2/5/6/256CCCFB-5341-4A8D-A277-8A81B21A1E35/Windows8.1-KB2919355-x64.msu" } | |
#Needed to avoid provision stop in W2016 because is not needed | |
when: ansible_distribution == "Microsoft Windows Server 2012 R2 Datacenter" or ansible_distribution == "Microsoft Windows Server 2012 R2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Download Hotfixes | |
win_get_url: | |
url: "{{ item.url }}" | |
dest: "C:/{{ item.kb }}.msu" | |
with_items: | |
- { kb: KB2919442, url: "https://download.microsoft.com/download/D/6/0/D60ED3E0-93A5-4505-8F6A-8D0A5DA16C8A/Windows8.1-KB2919442-x64.msu" } | |
- { kb: KB2919355, url: "https://download.microsoft.com/download/2/5/6/256CCCFB-5341-4A8D-A277-8A81B21A1E35/Windows8.1-KB2919355-x64.msu" } | |
- name: Install KB2919442 Hotfix | |
win_hotfix: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netsh advfirewall firewall add rule name="Open Zabbix agentd port 10050 inbound" dir=in action=allow protocol=TCP localport=10050 | |
netsh advfirewall firewall add rule name="Open Zabbix agentd port 10050 outbound" dir=out action=allow protocol=TCP localport=10050 | |
netsh advfirewall firewall add rule name="Open Zabbix trapper port 10051 inbound" dir=in action=allow protocol=TCP localport=10051 | |
netsh advfirewall firewall add rule name="Open Zabbix trapper port 10051 outbound" dir=out action=allow protocol=TCP localport=10051 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host * | |
ForwardAgent no | |
ForwardX11 no | |
ForwardX11Trusted yes | |
User root | |
Port 22 | |
Protocol 2 | |
StrictHostKeyChecking no | |
UserKnownHostsFile /dev/null | |
ServerAliveInterval 60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Create Azure VM | |
hosts: localhost | |
connection: local | |
tasks: | |
- name: Create virtual network | |
azure_rm_virtualnetwork: | |
resource_group: myResourceGroup | |
name: myVnet | |
address_prefixes: "10.0.0.0/16" | |
- name: Add subnet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Input Parameters for | |
# - VmName: name of the vm to perform action to | |
# - ResourceGroupName: resource group where the vm belongs to | |
# - VmAction:action to perform (startup or shutdown) | |
Param( | |
[string]$VmName, | |
[string]$ResourceGroupName, | |
[ValidateSet("Startup", "Shutdown")] | |
[string]$VmAction |
NewerOlder