On 25-10-16 17:02, ZillaYT wrote:
I have a role whose main.yml file includes several *.yml files, e.g.,

|
main.yml
---
-include:tasks1.yml
-include:tasks2.yml


tasks1.yml
---
-name:Createdir
  file;path=/tmp/dir1 state=dir

-name:Createfile fromtemplate
  template:src=my_script.sh.j2 dest=/tmp/dir1/my_script.sh mode=0755

-name:Executescript
  command:/tmp/dir1/my_script.sh

|


I want to execute EVERYTHING in tasks1.yml on my local machine, but
tasks2.yml on the target machine. Besides using local_action on all the
tasks, what's a more global way to do it?

Have you looked at delegate_to ?

http://docs.ansible.com/ansible/playbooks_delegation.html#id10

HTH,
Patrick

--
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/fb5f7acb-9bd2-d95d-8006-b4b044c74e35%40laimbock.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to