Skip to content

Instantly share code, notes, and snippets.

@aussielunix
Created May 28, 2015 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aussielunix/5f2d7341b2d9e80bcd2c to your computer and use it in GitHub Desktop.
Save aussielunix/5f2d7341b2d9e80bcd2c to your computer and use it in GitHub Desktop.
extending ansible aws with awscli
---
- hosts: localhost
connection: local
gather_facts: no
vars:
region: ap-southeast-2
name: test-vpc
tasks:
- name: get vpc id
command: "aws ec2 describe-vpcs --filters Name=tag:Name,Values={{ name }} --query 'Vpcs[0].VpcId' --output text"
register: vpcid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment