Need Help for RAW module

18 views
Skip to first unread message

Samarth Singh

unread,
Dec 23, 2015, 9:36:48 AM12/23/15
to Ansible Project
This is my play book :

---
- name: take backup of network devices
  hosts: droplets
  gather_facts: false



  tasks:

  - name: take backup
    raw: backup
    raw: \r              #want to send enter#
    raw: \r

when I run this playbook. It returns with error :

 "stdout": "\r\nLine has invalid autocommand \"\\r\""}


The purpose of this playbook is to send multiple RAW command one by one and want to send enter.  



Brian Coca

unread,
Dec 23, 2015, 10:25:14 AM12/23/15
to Ansible Project
each raw command is a different shell, you cannot use it to handle a
program interactively, that is what the expect module is for



--
Brian Coca
Reply all
Reply to author
Forward
0 new messages