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

Ansible Restore Playbook Issue

yuganwimukthi
Beginner
Beginner

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

Georg Pauwen
VIP Master VIP Master
VIP Master

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
Beginner
Beginner

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
Beginner
Beginner

can you please show me your CR1.cfg file ?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers