# interactive session support

**URL:** <https://forum.ansible.com/t/interactive-session-support/18287>\
**Category:** Ansible Project\
**Created:** [May 22, 2015, 11:48am UTC](https://forum.ansible.com/t/interactive-session-support/18287 "2015-05-22T11:48:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viktor\_Tsymbalyuk](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@Viktor\_Tsymbalyuk](https://forum.ansible.com/u/Viktor_Tsymbalyuk)\
**Post date:** [May 22, 2015, 11:48am UTC](https://forum.ansible.com/t/interactive-session-support/18287/1 "2015-05-22T11:48:09Z")

</div>

Hello,  
As I understood, currently it’s not possible send commands in an interactive session (command streamed before receiving the switch’s prompt are ignored).

It could be useful feature to work with routers, switches and other devices witch don’t support python and has specific terminals.  
Also it could speed-up play, because it don’t need every time to establish ssh connection (if ControlPersist not available).

Are there any plans to implement interactive session support?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [May 26, 2015, 5:23pm UTC](https://forum.ansible.com/t/interactive-session-support/18287/2 "2015-05-26T17:23:00Z")

</div>

This is not a feature we are contemplating, as there are already good  
interactive multiple machine ssh clients (cssh, pssh, etc).

Ansible is an automation tool, it is not meant for interactive  
consoles. For most network devices we are accepting modules that  
configure them through available APIs. In some cases by treating them  
as unix machines as many routers are now exposing their Linux or BSD  
nature to the user.

In your case you might be limited to the raw module which we do not  
recommend except as a way to bootstrap full Ansible support  
(installing python). In some cases you might be stuck with using the  
template module to create a config file to upload to the router, it is  
not a great solution but this is mostly a limitation of the router  
software.

---

<div class="post-metadata">

**Author:** ![Viktor\_Tsymbalyuk](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@Viktor\_Tsymbalyuk](https://forum.ansible.com/u/Viktor_Tsymbalyuk)\
**Post date:** [May 26, 2015, 5:44pm UTC](https://forum.ansible.com/t/interactive-session-support/18287/3 "2015-05-26T17:44:33Z")

</div>

actualy, instead of creating configs from templates, I prefere to have playbook like, below

`

- name: ‘configure terminal’

```auto
    raw: conf t
    when: check_mode.stdout.find("#") != -1
    register: result
    failed_when: result.stdout.find("(config)") == -1

  - name: 'interface configuration fa0/1'
    raw: int fa0/1
    register: check_mode
    failed_when: check_mode.stdout.find("(config-if)") == -1

  - name: no shutdown
    raw: shutdown
    register: responce
....

```

`  
But, in general I agree with you - it’s safe to use mentioned tools, until we get API from vendors.  
Thank you.
