Ansible doesn't use the host environment files like .bashrc because it's inconsistent if you have many hosts, it encourages centralized management.
To set environment variables, see this feature: http://docs.ansible.com/playbooks_environment.html On Wed, Aug 13, 2014 at 8:22 PM, Darup tek <[email protected]> wrote: > It worked after I moved the command to another task section > - name: Configure open-pbis login shell > command: '/opt/pbis/bin/config LoginShellTemplate /bin/bash' > - name: Configure open-pbis default domain > command: /opt/pbis/bin/config AssumeDefaultDomain true > > > Can I cascade commands one after the other after from one section ? > > On Wednesday, August 13, 2014 3:17:44 PM UTC-7, Darup tek wrote: >> >> I am trying to execute the commands over playbook. >> >> - name: Configure open-pbis >> action: command /opt/pbis/bin/config LoginShellTemplate /bin/bash >> action: command /opt/pbis/bin/config AssumeDefaultDomain true >> >> >> It is not setting the bash environment when I execute it with >> anisble-playbook. >> [root@xxxxxxxxx~]# su - yyyy >> -sh-4.1$ env|grep SHELL >> SHELL=/bin/sh >> -sh-4.1$ >> >> Whereas, it is working absolutely fine when I execute the command " >> /opt/pbis/bin/config >> LoginShellTemplate /bin/bash" >> [yyyyy@xxxxxxxxxxxxxxxxxxxx ~]$ env|grep SHELL >> SHELL=/bin/bash >> >> Is there any thing special I have to do to make sure the command is >> executed as it is, it should reflect the bash as SHELL. >> >> >> Thanks >> >> >> -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/774f90a8-c3e2-421e-8e75-49ef2a102866%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/774f90a8-c3e2-421e-8e75-49ef2a102866%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxnM5y0YEH%2B8hZt4xgAHzeUU0_0wAmTN8CMwvjj4wgEyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
