From a9e23cf090ab60874bc696ae3c5ef217cdc8ec5f Mon Sep 17 00:00:00 2001 From: Brennan Ashton Date: Wed, 2 Jul 2014 16:21:55 -0700 Subject: [PATCH] ansible_ec2_instance-id key incorrect ansible_ec2_instance-id should be ansible_ec2_instance_id fatal: [*IP*] => One or more undefined variables: 'dict object' has no attribute 'ansible_ec2_instance-id' --- docsite/rst/guide_aws.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docsite/rst/guide_aws.rst b/docsite/rst/guide_aws.rst index a404c6c1e5e..deecca2bda5 100644 --- a/docsite/rst/guide_aws.rst +++ b/docsite/rst/guide_aws.rst @@ -266,7 +266,7 @@ Example 4 - debug: var=hostvars[inventory_hostname] # just show the instance-id - - debug: msg="{{ hostvars[inventory_hostname]['ansible_ec2_instance-id'] }}" + - debug: msg="{{ hostvars[inventory_hostname]['ansible_ec2_instance_id'] }}" # Using the instanceid, call the ec2 module @@ -288,7 +288,7 @@ Example 4 region={{ region }} instance_ids={{ item }} wait=true - with_items: hostvars[inventory_hostname]['ansible_ec2_instance-id'] + with_items: hostvars[inventory_hostname]['ansible_ec2_instance_id'] .. note:: more examples of this are pending. You may also be interested in the ec2_ami module for taking AMIs of running instances.