Hi,
I am using ec2_remote_facts to find the ec2 facts of an instance based on the tags.
`
- name: Search ec2
ec2_remote_facts:
filters:
“tag:Name”: “{{hostname}}”
aws_access_key: “{{aws_access_key}}”
aws_secret_key: “{{aws_secret_key}}”
region: “{{aws_region}}”
register: ec2_info
`
Now I want to get the instance id of the instance id of that particular host and store it in a variable to use it in my playbook.
Can someone please help in finding or extracting the instance id.
Thanks,