I am a new user of Ansible.


I am trying to use the IOS_Config module and a I cannot find the syntax 
error in my playbook (See Below).  I suspect I may be missing the 
IOS_Config module? I am on Mac running 2.2. But I am unsure if I have the 
developer modules or not.


Have confirmed no invisible characters in the file.




I am getting this error:



MacBook-Pro:ansible nealzipper$ ansible-playbook -i inventory backup-configs
.yml -vvv

 

Using /etc/ansible/ansible.cfg as config file 

ERROR! Syntax Error while loading YAML. 


The error appears to have been in '/Users/neal/ansible/backup-configs.yml': 
line 20, column 7, but may 

be elsewhere in the file depending on the exact syntax problem. 


The offending line appears to be: 

      - name: SAVE AND BACKUP CONFIGS 

      ^ here 

MacBook-Pro:ansible neal$ 



Here my playbook :


---



  - name: PLAY - BACKUP

    hosts: all

    gather_facts: no

    connection: local




    tasks:




       - name: OBTAIN LOGIN CREDENTIALS

         include_vars: ./secrets.yml




       - name: DEFINE PROVIDER

         set_fact:

         provider:

            host: "{{ inventory_hostname }}"

            username: "{{ creds['username'] }}"

            password: "{{ creds['password'] }}"

            auth_pass: "{{ creds['auth_pass'] }}"




      - name: SAVE AND BACKUP CONFIGS

        ios_config:

          backup: yes

          local_file: {{ filename }}



          platform: {{ net_platform }}


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8e16b520-208d-45cd-bbe3-2b049399ab21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to