Hi…
I want to change the current directory in remote host by Ansible.
so, i have created the playbook like below. but, it is not working correctly.
would you please let me know how can i do change the current directory in the remote host?
Kevin
Hi…
I want to change the current directory in remote host by Ansible.
so, i have created the playbook like below. but, it is not working correctly.
would you please let me know how can i do change the current directory in the remote host?
Kevin
Hi..
I want to change the current directory in remote host by Ansible.
so, i have created the playbook like below. but, it is not working
correctly.
What problem are you actually trying to solve? Maybe try `args: chdir=/mydir`
V/r,
James Cassell
Consider that EACH task get's it's own environment and session, the
first task hat does a cd, does NOT affect subsequent tasks.
Hi… All
Thank you so much your help!
After changed the my playbook like below, working directory is changed.
Kevin
- name: Go to /cftmp Directory and check the Direcotry in the switch
become: yes
become_method: sudo
command: ‘pwd’
args:
chdir: /cftmp
register: exec_result
- debug: var=exec_result.stdout_lines
2019년 5월 15일 수요일 오전 9시 20분 2초 UTC+9, Kevin Kwon 님의 말: