Running ec2_instance_facts Ansible module and registering it to a variable called ec2.
I have tags on ec2 instance which has colon characters in its key name.
I can grab environment tag value using this:
set_fact:
number_of_nodes: "{{ ec2.instances|json_query('[*].tags.environment') }}"
But cannot grab value of "aws:lc:sg", trying the following:
set_fact:
number_of_nodes: "{{ ec2.instances|json_query('[*].tags.aws:lc:sg') }}"
Also tried by putting \, \ , /, // characters before colon. Doesn't work.
Can someone help ? :(