Hi all,
Could someone please help me with the following issue.
I have created the EC2 security group using the
ec2_group module.
ec2_group
name: group name
description: group description
rules:
- proto: tcp
to_port: 22
cidr_ip: 127.0.0.1
...
register: sg
If I display the sg variable using the debug, I see all security group
information.
Now I need to retrieve the rules array from the sg variable, actually need
to retrieve the cidr_ip from rules and I am not sure how.
I tried the following: sg.rules[0].cidr_ip, gave me an incorrect variable
error. It even gives me the incorrect "rules" variable if I do something
like
sg.rules
However I can do sg.group_id with no problems.
So I am probably missing something simple. Could someone please tell me
what is the proper way to retrieve the dictionary value, for the key, which
is the dictionary or array of dictionaries itself.
Thanks so much in advance for any help.
-Igor.
--
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/a3d221bf-7bb3-40a5-9d78-9f66a46342c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.