copying bin file from ansible control server to switch

27 views
Skip to first unread message

rajthecomputerguy

unread,
May 24, 2019, 6:53:23 AM5/24/19
to Ansible Project
Hi team,

Can you please provide me the module to copy the IOS image file to cisco switch?

I used below but it prompts for password

- name: COPY OVER IOS IMAGE

  command: "scp system-image-filename.bin {{inventory_hostname}}:/system-image-filename.bin"

- name: SET BOOT SYSTEM FLASH
  ios_config:
    commands:
      - "boot system flash:system-image-filename.bin"

rajthecomputerguy

unread,
May 24, 2019, 9:04:14 AM5/24/19
to Ansible Project
I am getting  below error

"msg": "Exception received : Administratively disabled.\n"



my playbook is 

    - name: Copying file from Ansible
      net_put:
        src: /home/testuser/ansible/from_ansible.text

    - name: copying IOS image to cisco switch
      net_put:
        src: /home/testuser/ansible/from_ansible.text
        protocol: tftp
        dest: flash:/from_ansible.text

Richard Bywater

unread,
May 25, 2019, 7:12:21 AM5/25/19
to ansible...@googlegroups.com
Based on a quick GOogle search that gives https://community.cisco.com/t5/network-management/distribute-sw-images-through-scp-failed/td-p/706491 , this sounds more like a Cisco config issue than an Ansible one.

Richard.

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c20c81b5-5978-4b2a-b22f-81d775fec3c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pushparaj Gothandam

unread,
May 25, 2019, 12:05:36 PM5/25/19
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages