03-22-2022 10:41 AM
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
03-22-2022 12:51 PM
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...
03-22-2022 01:18 PM
03-22-2022 01:56 PM
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
03-23-2022 10:32 AM
Removed double quote on "src" section after that it working properly. Thank you for your help.
08-01-2022 02:32 PM
can you please show me your CR1.cfg file ?
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: