Just Lucky
Just Lucky

Reputation: 1

How to automate Cisco ios switch running-config backup to tftp server using ansible

I have tried ios_command module to run command "copy running-config tftp" Next I have to provide ip of tftp server. Followed by destination file name. I have tftp server running and I have ip address of it. But to provide the ip address and file name. I have tried with sending ios_command:

commands:

-copy running-config tftp
-ip of my tftp server.

It didn't worked Can anyone help me?

Upvotes: -1

Views: 1291

Answers (1)

  - name: "Use of Ios commands"
    ios_command:
      commands: 
        - "copy running-config tftp:\n<your_ip_adresse>"
        prompt: '[<your_destination_filename>]?'
        answer: '\r'

Upvotes: 0

Related Questions