Hi,
cat ios.yml
---
- name: Backup current switch config (ios)
cisco.ios.ios_config:
backup: yes
register: backup_ios_location
when: ansible_network_os == 'cisco.ios.ios'
as per the doc i try to use it but when i ran i am getting syntax error like below:-
ansible-playbook ios.yml
ERROR! 'cisco.ios.ios_config' is not a valid attribute for a Play
The error appears to be in '/etc/ansible/ios.yml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Backup current switch config (ios)
^ here
even i did change the inventory file and added vars in separate yml file