Power of 2 loop

20 views
Skip to first unread message

Imran Khan

unread,
Aug 22, 2014, 8:49:14 AM8/22/14
to ansible...@googlegroups.com
    - name: Do some mathematics divide multiply
      #insert logic here
      register: my_content  # save logic in register
      with_sequence: count={{loopvar}}  #I need a loop sequence here
can I need to set the stride to 2^2. Is that possible?

Matt Martz

unread,
Aug 22, 2014, 9:18:42 AM8/22/14
to ansible...@googlegroups.com
You should be able to achieve this using the following syntax:

"{{ (loopvar|int)**2 }}"


--
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/1895b841-4ff0-4f12-89d9-9c3c657fd9ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
ma...@sivel.net
http://sivel.net/
Reply all
Reply to author
Forward
0 new messages