How to change the default Shell or Terminal Type

419 views
Skip to first unread message

Nagaraju chappa

unread,
Aug 4, 2021, 7:23:24 PM8/4/21
to Ansible Project
Hi Team ,

When I am running an Ansible Playbook on an host it works fine with the root user , but when I tried with different user it is timing out .  It seems the ksh shell profile is looking for terminal type  for that user .Since  I am not passing from playbook it is timing out . 
For the same user , it works fine when I change the default shell to bash on the host . 

My question here is ,

    1) is there a way programmatically can change the default shell to /bin/bash  from playbook?

        I tried using environmental variable , but it didn't work.
      or 

    2) Is there a way to pass the terminal type ?

Thanks for your help in advance . 

Thanks,
Nagaraju 

Dick Visser

unread,
Aug 5, 2021, 12:44:51 AM8/5/21
to ansible...@googlegroups.com
What exactly is timing out? At what stage?
Either way, this looks like it's not something to fix from within ansible.
I would use the 'env' command to find out exactly what you need.

--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8cd42662-9442-4e79-802e-2c5dc6718282n%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Brian Coca

unread,
Aug 5, 2021, 10:56:01 AM8/5/21
to Ansible Project
By default ansible uses /bin/sh (which POSIX systems are required to
have), changing the shell is non trivial and has many consequences.
That said, use the `ansible_shell_type` variable, but must be to a
matching existing shell plugin (there is no bash but there is an sh
one).

--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages