Skip to content

Instantly share code, notes, and snippets.

@hernandesbsousa
Created July 22, 2014 17:21
Show Gist options
  • Save hernandesbsousa/33442704a26f9ca6bf90 to your computer and use it in GitHub Desktop.
Save hernandesbsousa/33442704a26f9ca6bf90 to your computer and use it in GitHub Desktop.
Issue with instance tags on ec2 module
vars:
key_name: mykey
instance_type: t2.micro
security_group: sg-xxxxxxxx
image: ami-f5b815e8
region: sa-east-1
subnet_id: subnet-5eaxxxxx
instance_tags:
- '{"foo": "bar"}'
tasks:
- name: Launch instance
local_action: ec2
key_name={{ key_name }}
group_id={{ security_group }}
instance_type={{ instance_type }}
image={{ image }}
wait=yes
region={{ region }}
assign_public_ip=yes
vpc_subnet_id={{ subnet_id }}
instance_tags="{{ instance_tags }}" # not working
register: ec2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment