# OpenSwitch Ansible user with non-bash access

**URL:** <https://forum.ansible.com/t/openswitch-ansible-user-with-non-bash-access/22063>\
**Category:** Ansible Developer\
**Created:** [July 20, 2016, 5:20pm UTC](https://forum.ansible.com/t/openswitch-ansible-user-with-non-bash-access/22063 "2016-07-20T17:20:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh\_Ragavan](https://avatars.discourse-cdn.com/v4/letter/g/d07c76/32.png) [@Ganesh\_Ragavan](https://forum.ansible.com/u/Ganesh_Ragavan)\
**Post date:** [July 20, 2016, 5:20pm UTC](https://forum.ansible.com/t/openswitch-ansible-user-with-non-bash-access/22063/1 "2016-07-20T17:20:52Z")

</div>

Hi,

We have been using Ansible playbooks to configure OpenSwitch using the ops\_template module. For this we have been using admin account that has access to the bash prompt in the OpenSwitch and it has been working fine.

We are making changes to the admin account privileges and default shell for admin account. Admin user will default to “vtysh” shell and with a command “start-shell” moves to bash.

With this change, the playbook (the below command) will fail as bash access is not available. Can some please suggest how to fix this issue ? Basically we want to use an user in the playbook that doesn’t have bash access.

ansible-playbook .yaml -vvv

SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=admin -o ConnectTimeout=10 -o ControlPath=/home/master/.ansible/cp/ansible-ssh-%h-%p-%r ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1468907294.61-280623960073589`” && echo ansible-tmp-1468907294.61-280623960073589=“`echo $HOME/.ansible/tmp/ansible-tmp-1468907294.61-280623960073589`” ) && sleep 0’“'”‘’

We tried passing start-shell to the ssh command above, but it doesn’t work.

Thanks,  
Ganesh

---

<div class="post-metadata">

**Author:** ![psprygada](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@psprygada](https://forum.ansible.com/u/psprygada)\
**Post date:** [July 21, 2016, 12:10am UTC](https://forum.ansible.com/t/openswitch-ansible-user-with-non-bash-access/22063/2 "2016-07-21T00:10:11Z")

</div>

I suspect that will require a feature update to the existing module… can you file an issue at [github.com/ansible/ansible-modules-core](http://github.com/ansible/ansible-modules-core) so we can track this? thanks
