Hi,
I'm trying to include a play from different play book. The structure is as
follows:
---
- hosts: localhost
vars_files:
- /etc/ansible/parent/parent.yml
tasks:
- name: Template the component properties files
template:
src=/etc/ansible/templates/{{item}}.j2
dest=/etc/ansible/templates/{{item}}/service-container.properties
with_items:
- [ 'router', 'report-scheduler', 'WH-Payload-Processor']
tasks:
- include: /etc/ansible/playbooks/wrapper.yml
---
- hosts: localhost
tasks:
- name: Template the wrapper.conf file
template:
src=/etc/ansible/templates/wrapper.j2
dest=/etc/ansible/templates/router/wrapper.conf
vars:
- serviceName: router
However i get the error "no task detected". what is the issue here?
=>Also is this feasible:
---
- hosts: localhost
vars_files:
- /etc/ansible/parent/parent.yml
tasks:
- name: Template the component properties files
template:
src=/etc/ansible/templates/{{item}}.j2
dest=/etc/ansible/templates/{{item}}/service-container.properties
with_items:
- [ 'router', 'report-scheduler', 'WH-Payload-Processor']
tasks:
- include: /etc/ansible/playbooks/wrapper.yml some_var={{item}}
with_items
- router
- gateway
- resource
---
- hosts: localhost
tasks:
- name: Template the wrapper.conf file
template:
src=/etc/ansible/templates/wrapper.j2
dest=/etc/ansible/templates/{{item}}/wrapper.conf
vars:
- serviceName: {{item}}
--
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/84c7defc-342e-4b1e-9c11-ed9aa275451f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.