Hi, you can do something like:

  - name: create dirs
    file: dest=/tmp/tomcat-instance{{ item }} state=directory
    with_sequence: start=1 end=3
    register: dies

  - debug: var=dirs.results

  - name: do something with tomcat
    shell: echo "sudo tomcat-instance1-create -p {{ 8080 + (item.item | 
int) }} -c {{ 8005 + (item.item | int) }} name{{ item.item }}"
    with_items:
      - "{{ dirs.results }}"
    register: something

  - debug: var=something.results

Register with debug can produce a lot of interesting information about 
tasks )
http://docs.ansible.com/ansible/playbooks_variables.html#registered-variables
http://docs.ansible.com/ansible/playbooks_filters.html
http://docs.ansible.com/ansible/playbooks_loops.html

-- 
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/109ab9f8-49e0-4390-86e3-dcf927f98a04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to