Skip to content

Instantly share code, notes, and snippets.

View viper233's full-sized avatar

Stephen Granger viper233

View GitHub Profile
@viper233
viper233 / win-aws.yml
Created June 21, 2016 15:53
ec2 Windows fix ups
- hosts: localhost
gather_facts: no
vars:
target_aws_region: us-west-2
subnet_id: "change_me"
vpc_id: "change_me"
allowed_ip: "0.0.0.0/0"
vars_files:
- secret.yml
@viper233
viper233 / ansible_api_playbook.py
Created February 26, 2016 22:29
Example using Ansible API 2.0 to run a playbook
#!/usr/bin/env python
# stolen from http://stackoverflow.com/questions/27590039/running-ansible-playbook-using-python-api
import os
import sys
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory