Hey chaps,
Is there any reason why "ec2_group_facts" is not using my fact? Can
ec2_group_facts use defined facts?
- name: Get vpc details
ec2_vpc_net_facts:
region: "{{new_region}}"
filters:
"tag:Name": "blah*"
register: result
- name: Define VPC ID
set_fact:
new_vpcID: result.vpcs[0]['id']
- debug: var="{{new_vpcID}}"
- name: Get SG in new VPC
ec2_group_facts:
filters:
vpc-id: "{{new_vpcID}}"
So I can get the existing VPC...
TASK [debug]
*******************************************************************
task path: /blah/blah/projects/query_network.yml:13
Monday 06 November 2017 12:07:34 +0000 (0:00:00.033) 0:00:00.753
*******
ok: [localhost] => {
"result.vpcs[0]['id']": "vpc-c8f8f2a0"
}
But why is the filter "Get SG in new VPC" not getting any results?
TASK [Get SG in new VPC]
*******************************************************
task path: /blah/blah/projects/query_network.yml:15
Monday 06 November 2017 12:07:34 +0000 (0:00:00.036) 0:00:00.789
*******
ok: [localhost] => {"changed": false, "failed": false, "security_groups":
[]}
META: ran handlers
META: ran handlers
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6bfc0400-34c7-4c67-aed9-7dd36f0352c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.