iosxr_config load config question

91 views
Skip to first unread message

Radoslav Mitov

unread,
Sep 13, 2016, 1:00:46 PM9/13/16
to Ansible Project
Hi All,
I have a problem with uploading a config file to ios XR box.
When i run the play the error is:

fatal: [pe2]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"backup": false, "host": "192.168.1.21", "provider": {"host": "192.168.1.21", "ssh_keyfile": "/home/rado/.ssh/z-id_rsa", "transport": "cli", "username": "rado"}, "src": "fabric.cfg", "ssh_keyfile": "/home/rado/.ssh/z-id_rsa", "username": "rado"}, "module_name": "iosxr_config"}, "msg": "unsupported parameter for module: src"}

below is the role:
---
- name: transfer generated file to IOS
  hosts: cisco
  gather_facts: no
  vars:
    cli:
      host: "{{ ansible_ssh_host }}"
      username: rado
      transport: cli
      ssh_keyfile: /home/rado/.ssh/z-id_rsa
  tasks:
  - name: load a config from disk and replace the current config
    iosxr_config:
      src: "fabric.cfg"
      update: replace
      backup: no
      provider: "{{ cli }}"

Thanks in advance!

Peter Sprygada

unread,
Sep 13, 2016, 10:08:00 PM9/13/16
to ansible...@googlegroups.com
Hi Radoslav,

Can you post the output of ansible --version?

One of two things is happening here:

1) you are not running Ansible from source (the src argument is being added in the upcoming 2.2 release)
2) you are running from source but the module cannot find the file "fabric.cfg".  If you are running from 
the latest commit on devel, we recently added a check that would alert you if the file specified in src could not be found

--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a39e7229-bbb5-49ea-9ae0-36c515ba9a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages