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:
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:
>
> 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