Skip to content

Instantly share code, notes, and snippets.

View jonhadfield's full-sized avatar

Jon Hadfield jonhadfield

  • 01:43 (UTC +01:00)
View GitHub Profile
@jonhadfield
jonhadfield / hosts
Last active April 7, 2019 10:18
python-hosts-example-file
127.0.0.1 www.example.com
127.0.0.1 mail.example.com
127.0.0.1 example.com
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of

Keybase proof

I hereby claim:

  • I am jonhadfield on github.
  • I am jonhadfield (https://keybase.io/jonhadfield) on keybase.
  • I have a public key ASAMsjQJoIsUWj8MtRSZqp4-Nw586GfN_-Dy1jbvXbWOaQo

To claim this, I am signing this object:

@jonhadfield
jonhadfield / test_failures.yml
Created June 12, 2016 18:12
Test ec2_vpc_nat_gateway failures
---
- name: Test VPC NAT Gateway Module
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: test fail with invalid state
ec2_vpc_nat_gateway:
state: notpresent
subnet_id: "subnet-a67643d1"
@jonhadfield
jonhadfield / test_successes.yml
Created June 12, 2016 18:10
Test ec2_vpc_nat_gateway successes
---
- name: Test VPC NAT Gateway Module
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: create VPC NAT Gateway
ec2_vpc_nat_gateway:
state: present
subnet_id: "<you subnet id>"
@jonhadfield
jonhadfield / ec2_vpc_nat_gateway.py
Created May 5, 2016 15:49
ec2_vpc_nat_gateway with backported camel_dict_to_snake_dict
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of