Shobha,
I don't think there's a module for that yet, but you can use the `command` 
module to call the aws cli.  It'll give you a JSON string that you can 
parse with a from_json filter:


- name: "Get AWS regions json"
  command: aws ec2 describe-regions
  register: describe_regions


- name: "Parse AWS regions into aws_regions"
  set_fact:
    aws_regions: "{{ describe_regions.stdout | from_json }}"


- debug: var=aws_regions
(untested)

You should be able to do something similar for the Availability Zones too.

On Wednesday, October 4, 2017 at 2:47:24 AM UTC-4, sshob...@gmail.com wrote:
>
> Hi team,
>
> I would like to get a list of Amazon regions and availability zones using 
> ansible . Please let me know if this can be done using ansible 
>
> Regards,
> Shobha 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to