IOW, I want to do all the tasks inside the YML file on my local machine in "one fell swoop."
On Tuesday, October 25, 2016 at 11:23:11 AM UTC-4, ZillaYT wrote: > > Examples for delegate_to, local_action, etc. all show them being added per > task. Though this will definitely accomplish what I want, I just want to do > it in a more "file-global" way. Again, per my OP. > > Chris > > On Tuesday, October 25, 2016 at 11:14:36 AM UTC-4, Patrick Laimbock wrote: >> >> 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/46693166-3ed5-40ec-9146-24774b8116c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
