> On 01/21/2022 8:15 AM Roland Müller <[email protected]> wrote:
> 
> 
> [email protected] schrieb am Mittwoch, 19. Januar 2022 um 17:38:49 UTC+2:
> 
> > On 19.01.22 11:53, Stefan Hornburg (Racke) wrote:
> > > On 19/01/2022 11:34, dulhaver via Ansible Project wrote:
> > >>
> > >> can anybody tell me whether the ~/.bashrc of a become_user is being
> > >> read on TASK execution, so you could rely on aliases, environment
> > >> variables or PATH to be effective?
> > > As far as know it is not being read. And I doubt that is a good idea
> > > if the goal is idempotence.
> > ok, thx
> > 
> 
> But doesn't reading of .bashrc and other bash files depend on the Ansible 
> module that is used, and whether the module executes inside a bash shell?
>  E.g., module 'shell' uses the bash shell unless some other shell is 
> configured explicitly. Thus, one can execute remote with 'shell' commands 
> with the same settings as in interactive login.
> 
I was not thinking about shell module tbh.

Still, do I understand you correctly that you mean something like
   ... .bashrc may not be read for most of Ansible modules but it is read for 
shell and maybe command module?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/101017182.696897.1642753957054%40office.mailbox.org.

Reply via email to