cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2001
Views
0
Helpful
5
Replies

Ansible Restore Playbook Issue

yuganwimukthi
Level 1
Level 1

I create a playbook to restore my router backup using ansible, but it didn't work properly. I attached a screenshot of my error.

 

---
- hosts: CR01
connection: network_cli
gather_facts: false

tasks:
- name: push config file
ios_config:
src: "home/yugan/desktop/backup/config/CR1.cfg"

- name: save running to startup
ios_config:
save_when: modified

5 Replies 5

Hello,

 

can you cat the entire file ? I do not count to line 19...

 

YAML syntax errors are often related to indentation or missing double quotes...

yuganwimukthi
Level 1
Level 1

ansible 01.JPG

Hello,

 

--> src: "home/yugan/desktop/backup/config/CR1.cfg" <--

 

The ending double quote does not appear in your screenshot. Make sure it is actually there

Removed double quote on "src" section after that it working properly. Thank you for your help.

issamhailoua
Level 1
Level 1

can you please show me your CR1.cfg file ?

Review Cisco Networking for a $25 gift card