Skip to content

Instantly share code, notes, and snippets.

View nidr0x's full-sized avatar
🎯
💭

Carlos nidr0x

🎯
💭
  • Abbott
  • Valencia (Spain)
View GitHub Profile
@nidr0x
nidr0x / SSH configuration
Last active April 27, 2018 11:25
SSH configuration
Host *
ForwardAgent no
ForwardX11 no
ForwardX11Trusted yes
User root
Port 22
Protocol 2
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ServerAliveInterval 60
@nidr0x
nidr0x / azure_create_complete_vm.yml
Created March 14, 2018 11:37
Creating Azure VM in Ansible
- 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
@nidr0x
nidr0x / azure-automation-poweron-poweroff
Created March 12, 2018 12:12
Schedule startup and shutdown of Azure Machines via PowerShell
# 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