Skip to content

Instantly share code, notes, and snippets.

View keyboardscience's full-sized avatar

Kevin Phillips keyboardscience

View GitHub Profile

Keybase proof

I hereby claim:

  • I am keyboardscience on github.
  • I am kevinp (https://keybase.io/kevinp) on keybase.
  • I have a public key ASDlAuPLlv_-vSRXBiNrUTsNq3ghw9ymfJ--FAEBzgVNvgo

To claim this, I am signing this object:

---
- name: Working with constrained remote host
hosts: remotes_without_python27
gather_facts: yes # this may fail
tasks:
- name: Render template locally
delegate_to: localhost
template:
src: templates/file_template.j2
#!/usr/bin/python2.7
import virtualenv
import os
extra_text = """
def after_install(options, home_dir):
# Install dependencies
subprocess.call([join(home_dir, 'bin', 'pip'),
'install', 'mock'])
module "vpc" {
source = "github.com/<redactred>"
aws_access_key = "${var.aws_access_key}"
aws_secret_key = "${var.aws_secret_key}"
aws_key_name = "${var.aws_key_name}"
aws_region = "${var.aws_region}"
cidr_base = "${var.cidr_base}"
my_ip = "${var.my_ip}"
vpn_passwd = "${var.vpn_passwd}"
}