Skip to content

Instantly share code, notes, and snippets.

View mrajani's full-sized avatar

Mahesh Rajani mrajani

  • San Francisco Bay Area
  • 09:22 (UTC -07:00)
View GitHub Profile
@mrajani
mrajani / gather_facts_from_azure_vm_metadata.yaml
Last active September 8, 2021 11:46 — forked from DevoKun/gather_facts_from_azure_vm_metadata.yaml
Ansible Gather Facts from Azure VM Metadata
---
- hosts: localhost
pre_tasks:
- name: "apt install curl"
apt:
name: curl
state: latest
when: ansible_os_family == "Debian"
#region Ensure the WinRm service is running
Set-Service -Name "WinRM" -StartupType Automatic
Start-Service -Name "WinRM"
#endregion
#region Enable PS remoting
if (-not (Get-PSSessionConfiguration) -or (-not (Get-ChildItem WSMan:\localhost\Listener))) {
Enable-PSRemoting -SkipNetworkProfileCheck -Force
}
#endregion
@mrajani
mrajani / InstallChocolateyPackages.ps1
Created March 11, 2021 15:57 — forked from ddieppa/InstallChocolateyPackages.ps1
My "must" chocolatey packages
function main {
Update-Windows-Configuration
Install-Utils
Install-Browsers
Install-Fonts
@mrajani
mrajani / app.tf
Created July 25, 2020 00:53 — forked from joatmon08/app.tf
Terraform Example for Azure App Gateway & App Service
locals {
app_services = [
{
kind = "Linux"
sku = {
tier = "Standard"
size = "S1"
}
},
{
@mrajani
mrajani / pedantically_commented_playbook.yml
Created October 2, 2019 15:46 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.