Thanks for Brian,
I have tried all these suggestions but with no luck.

- name: Sourcing commands from helpers file
      command: source chdir="{{workspace }}"
      become: true
      become_user: <user>

TASK [Debug] 
ok: [] => {
    "msg": "Workspace is /home/<user>/projects/<confidential>"

TASK [Sourcing commands for database management from helpers file] 
fatal: []: FAILED! => {"changed": false, "cmd": "source", "failed": true, "msg": "[Errno 2] No such file or directory", 
"rc": 2}

I file is definitely there and the path is right. I must be missing 
something fundamental, possibly simple.


On Friday, 16 September 2016 19:38:12 UTC+1, Brian Coca wrote:
> This is how that would be sourced with su (just not sure that is useful 
> either):
> - command: source chdir="{{ command_directory }}"
> ​  become: True
> ^ the issue is that 'sudo su -' is not supported, you either need full 
> sudo or be able to run 'su'​ directly.
> ----------
> Brian Coca

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 post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to