--- #in some role
# some tasks here
- include: upstart
vars:
name: '{{ item.name }}'
command: '{{ item.command }}'
root: /path/to/app
instance_count: '{{ item.instance_count }}'
with_items: '{{ my_services }}'
# some other tasks here=====> test.yml
---
- hosts: all
tasks:
- name: Ping-pong
ping:
- { include: "{{ item }}.yml", with_items: [ ping, pong ]}
=====> ping.yml
- name: Ping
ping:
=====> pong.yml
- name: Pong
ping:
Hello,
we do this a lot for e.g. runit scripts. Our roles are partitioned in install software, configure runit and configure software
Regards
Mirko
--
Sent from my mobile
--
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/e6fabefc-3158-4141-b237-873579bcc351%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.