I'd run into a similar issue using the rax_dns and rax_dns_record modules, so I created a simple callback plugin to sleep after each task only when using the role that ran those modules: https://gist.github.com/cchurch/c2694a1de478ec417ee8
On Wed, Aug 5, 2015 at 4:35 AM, Dainiax <[email protected]> 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/8d7409fc-d5d8-4b74-ae9c-004bac8f7dbb%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/8d7409fc-d5d8-4b74-ae9c-004bac8f7dbb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAH%2BKTJ7W71wTuc1t8vu5Ndd%2BYUr4QpX2u7dm9DgzNtWW4HtMYg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
