Skip to content

Instantly share code, notes, and snippets.

variable "access_key" {
description = "AWS - access key"
type = string
sensitive = true
}
variable "secret_key" {
description = "AWS - secret key"
type = string
sensitive = true
provider "aws" {
region = "us-east-2"
access_key = var.access_key
secret_key = var.secret_key
}
module "infra" {
source = "wcollins/infra/aws"
vpc_name = "vpc-aws-east-2"
provider "azurerm" {
features {}
subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id
}
{
"builders": [{
"type": "azure-arm",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"tenant_id": "{{user `tenant_id`}}",
"subscription_id": "{{user `subscription_id`}}",
"managed_image_resource_group_name": "demo-eastus-rg",
---
collections:
- name: netbox.netbox
version: 1.0.0
source: https://galaxy.ansible.com
...
---
# Block - Append prefix-list on IOS
- name: Append prefix-list on IOS
block:
# Create temp staging directory
- name: Stage config directory
file:
path: "staging/{{ inventory_hostname }}"
---
- name: Add next prefix in Netbox
netbox.netbox.netbox_prefix:
netbox_url: "{{ netbox_url }}"
netbox_token: "{{ netbox_token }}"
data:
# Define criteria for prefix
parent: "{{ prefix_parent }}"
---
- include_tasks: task.netbox_reserve_prefix_vnet.yml
when: play_action == 'netbox_reserve_prefix_vnet'
- include_tasks: task.netbox_reserve_prefix_snet.yml
when: play_action == 'netbox_reserve_prefix_snet'
...
---
- hosts: all
connection: local
hosts: localhost
gather_facts: False
vars:
play_action: netbox_reserve_prefix_snet
roles:
@wcollins
wcollins / deploy_hugo_site.yml
Created June 24, 2020 17:25
GitHub Actions workflow for deploying Hugo
# .github/workflows/deploy_hugo_site.yml
name: Deploy Hugo Site
on:
push:
branches:
- master
jobs:
deploy: