Source is normally a shell-builtin, not an actual executable. As
you're calling the command module rather than the shell module, it
doesn't run an actual shell and so it can't find an executable called
'source'. That likely explains the error you are seeing, and using
'shell' rather than 'command' will likely solve that.

That said, 1) I don't believe Ansible runs two consecutive shell tasks
in the same shell anyway, and 2) it uses /bin/sh rather than the
user's default shell, making the point moot.

> The goal of this is to export variables in ~/.bashrc for the user who will be 
> using those variables a lot later in the playbook(s) for this setup.

The above issues of making it work aside, relying on the user's bashrc
sounds very brittle. What if he/she decides to start using another
shell in the future (such as zsh for example)? Is there a specific
reason you can't just set any necessary environment variables in your
playbook, and/or call programs by their full path instead of relying
on $PATH?

--
Nick Groenen | zoni | @NickGroenen
https://zoni.nl | GnuPG/GPG key ID: 0xAB5382F6

-- 
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 ansible-project+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to