Looks like found some kind of solution/work around on
https://github.com/ansible/ansible-modules-core/issues/143
check "*ndobbs <https://github.com/ndobbs> *commented on Jan 30 
<https://github.com/ansible/ansible-modules-core/issues/143#issuecomment-72140167>"
 
examples

It using 'local_action' with 'until', 'retries' and 'delay'. So using this 
example I was able to create 15 ELB in a row without getting/seeing errors.

On Wednesday, 5 August 2015 14:27:57 UTC+1, Dainiax wrote:
>
> Hello,
>
> Ansible 1.9.2
> Im working with Ansible AWS modules. I wanted to create 5 ELB for testing 
> surpose.
> Script:
> ...
>     - name: Create ELBs
>       connection: local
>       ec2_elb_lb:
>         aws_access_key: "{{ AWS_ACCESS_KEY_ID }}"
>         aws_secret_key: "{{ AWS_SECRET_ACCESS_KEY }}"
>         name: "{{ item.name }}{{ item.elb_id }}"
>         state: present
>         connection_draining_timeout: 60
>         cross_az_load_balancing: true
>         region: eu-west-1
>         zones:
>           - eu-west-1a
>           - eu-west-1b
>           - eu-west-1c
>         listeners:
>           - protocol: http
>             load_balancer_port: 80
>             instance_port: 80
>         health_check:
>             ping_protocol: tcp 
>             ping_port: 22
>             response_timeout: 5 # seconds
>             interval: 30 # seconds
>             unhealthy_threshold: 2
>             healthy_threshold: 5
>       with_items:
>         - { name: 'TEST-ELB-', elb_id: "01" }
>         - { name: 'TEST-ELB-', elb_id: "02" }
>         - { name: 'TEST-ELB-', elb_id: "03" }
>         - { name: 'TEST-ELB-', elb_id: "04" }
>         - { name: 'TEST-ELB-', elb_id: "05" }
> ...
>
> But it failed with errors
> ...
> <Error>
>     <Type>Sender</Type>
>     <Code>Throttling</Code>
>     <Message>Rate exceeded</Message>
>   </Error>
> ...
> So is it possible to sleep/pause between iterations of 'with_items' list 
> (as I understand AWS complains about requests coming too fast)?
> Do you have any other solutions for these types of scripts (cause I also 
> get the same errors for attaching instance to multiple ELBs)?
>
> Thank you
>
>

-- 
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/60b357ec-3d72-44cb-b94f-63ba6ff5d7cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to