interactive session support

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?

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.

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

`

  • name: ‘configure terminal’
    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.