# bastion host with python venv

**URL:** <https://forum.ansible.com/t/bastion-host-with-python-venv/22954>\
**Category:** Ansible Project\
**Created:** [November 3, 2016, 7:45pm UTC](https://forum.ansible.com/t/bastion-host-with-python-venv/22954 "2016-11-03T19:45:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Edelman](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jason\_Edelman](https://forum.ansible.com/u/Jason_Edelman)\
**Post date:** [November 3, 2016, 7:45pm UTC](https://forum.ansible.com/t/bastion-host-with-python-venv/22954/1 "2016-11-03T19:45:33Z")

</div>

Hi, I need to use a bastion host that only uses Python virtual environments. This bastion is also not technically under Ansible inventory mgmt, but I’m open to having it in the inventory file if needed.

What directives and/or configs are required for this?

I currently have the following:

- name: ENSURE FILE IS COPIED TO DEVICE  
nxos\_file\_copy:  
local\_file: ./os-images/cisco/nxos/nxos.7.0.3.I5.1.bin  
provider: “{{ nxos\_provider }}”  
tags: copy1  
delegate\_to: [internal.mgmt-server.ntc.com](http://internal.mgmt-server.ntc.com)  
remote\_user: ntc

Tried adding this to the inventory file too:

[other]  
[internal.mgmt-server.ntc.com](http://internal.mgmt-server.ntc.com) ansible\_python\_interpreter=‘/home/ntc/.virtualenvs/ansible-2.2/bin/python’

When I run the playbook, it just hangs…any ideas?

Thanks,  
Jason

---

<div class="post-metadata">

**Author:** ![Jason\_Edelman](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jason\_Edelman](https://forum.ansible.com/u/Jason_Edelman)\
**Post date:** [November 3, 2016, 7:47pm UTC](https://forum.ansible.com/t/bastion-host-with-python-venv/22954/2 "2016-11-03T19:47:23Z")

</div>

I should also add the the playbook is running with connection set to local.
