source is a bash function not a command. This is why it cannot find such
file, because there is no such file "source". Try to use shell module
instead of command.
Edgars
pirmdiena, 2016. gada 19. septembris 10:25:30 UTC+2, Charles Moga rakstīja:
>
> Thanks for Brian,
> I have tried all these su
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: [
This is how that would be sourced with su (just not sure that is useful
either):
- command: source mycommand.sh 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
--
Hi Dick,
Thanks for response. I have already tried that and it was not working. I
think the problem is related t the fact that I am running this playbook
with connection=local. I have a feeling that even though this is locally,
ansible still sees 127.0.0.1 as a separate entity on which the direc
your 'cd' command runs as a separate command, that's why its' not working.
Try adding a chdir= option to your script command, see :
http://docs.ansible.com/ansible/command_module.html
On 15 September 2016 at 16:10, Charles Moga wrote:
> Hello,
> I hope someone can answer this. I have a bunc