How to change the default Shell or Terminal Type

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

  1. Is there a way to pass the terminal type ?

Thanks for your help in advance .

Thanks,
Nagaraju

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.

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).