- name: Change the working directory to somedir/ before executing the command.
shell: somescript.sh >> somelog.txt
args:
chdir: somedir/
Does this help? Stolen
from: https://docs.ansible.com/ansible/2.5/modules/shell_module.html
On Thursday, 27 September 2018 11:11:47 UTC-4, venkatesh vanigalla wrote:
>
> How to change ansible script execution directory from /root to other
> fodler?
>
--
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/0c1a094c-b5b9-4869-8097-de0dfceacd71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.