I saw that setting the env for the whole book should be done with parts of
something like:

environment:
  PATH: "{{ ansible_env.PATH }}:/thingy/bin"
  SOME: value



(e.g. the source I did probably has no effect at all)

so I assume that I've answered one of the questions myself.



On Wed, Dec 19, 2018 at 8:52 AM Roeland Jansen <roeland.janse...@gmail.com>
wrote:

> I am pretty new to ansible. I looked at docs and such but it was not too
> clear for me yet.
>
> at some point in a playbook, the following sequence was executed via the
> shell module in some yaml file:
>
>      scl enable rh-git29 bash
>
> At that moment the playbook stops dead in it's tracks as the remote end
> executes a shell and never comes back. It hangs.
> If this observation is true, I don't understand why it could work in the
> first place.
> Is this conclusion true?
>
> Secondly, as the only thing the command does is sourcing in a file (needed
> for the rest of the playbook?)
> I changed it into:
>
>     source /opt/rh/rh-git29/enable
>
> I know that the vars are not retained between playbooks this way and is
> not needed. But is it retained
> within the playbook run itself?
>
> E.g. all folow-up still see the environment set? And does that also hold
> for any task that's included?
>
> (like: - include_tasks: create-something.yml)
>
> Roeland
>
>
>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Development" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-devel/i1e5wlFiv5g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-devel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to