[ansible-project] Ansible cannot find files after su to root

2016-09-15 Thread Charles Moga
Hello, I hope someone can answer this. I have a bunch of commands (shell scripts ) in a specific directory I need to run as root user. So I do: - name: Becoming root command: sudo su - - name: Changing directory command: cd "{{ command_directory }}" - name: Sourcing commands command:

Re: [ansible-project] Ansible cannot find files after su to root

2016-09-19 Thread Charles Moga
Thanks for Brian, I have tried all these suggestions but with no luck. - name: Sourcing commands from helpers file command: source helpers.sh chdir="{{workspace }}" become: true become_user: TASK [Debug] *** ok:

Re: [ansible-project] Ansible cannot find files after su to root

2016-09-16 Thread Charles Moga
> > http://docs.ansible.com/ansible/command_module.html > > On 15 September 2016 at 16:10, Charles Moga <charle...@gmail.com > > wrote: > > Hello, > > I hope someone can answer this. I have a bunch of commands (shell > scripts ) > > in a