I have the following task:
`
- name: Create ELK instance
ec2:
image: “{{ubuntu_image.ami}}”
region: “{{ec2_region}}”
vpc_subnet_id: “{{env_subnets.private|for_count(item)}}”
instance_type: “{{elk_instance_type}}”
assign_public_ip: false
group: “{{security_groups}}”
instance_tags:
Name: “{{env_prefix}}elk-{{item}}”
elk: “group”
env: “{{env}}”
managed_by: ansible
exact_count: 1
count_tag:
Name: “{{env_prefix}}elk-{{item}}”
key_name: “{{aws_key_name}}”
wait: yes
register: ec2_elk
with_sequence: count={{elk_instance_count}}
`
elk_instance_count = 1, and all the other attributes have correct values.
When I run this task the instance to be started is already running and the task should be “ok, changed=false” with the ec2_elk register populated.
With 1.9.1, this is indeed what happens. With 1.9.2-rc2 the status is “skipped” and the ec2_elk register is not populated.
To help me better debug, does anybody know of a reason why this behavior should have changed?