ansible - index counter with "with_item"

61 views
Skip to first unread message

Moris Amar

unread,
Nov 30, 2017, 11:09:43 AM11/30/17
to Ansible Project
Hi,

I want to have a counter (incrementation) in "with_items" in order to look over a list (index).

  ec2_metric_alarm:

...
    description: '{{ item.ec2_alarm_description }}'
    dimensions: '{{item.ec2_alarm_dimensions }}'
    alarm_actions: '{{ ec2_scaling_policy_reg.results[0].arn }}'
  with_items: '{{ ec2_metric_alarm_item }}'

Any suggestion?

thanks




Matt Martz

unread,
Nov 30, 2017, 2:51:48 PM11/30/17
to ansible...@googlegroups.com
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5f140311-07c9-4999-8a56-810f8a0c71ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Matt Martz
@sivel
sivel.net
Reply all
Reply to author
Forward
0 new messages