Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

EEM to tftp copy code snippets to running config

is it possible to use EEM to copy code snippets from tftp server to the runnign config =- i'm trying to do this but no joy so far

event manager applet CHANGE-IGMP
event none
action 1.0 cli command "enable"
action 1.1 cli command "copy tftp://192.160.11/SNIPPET1.txt system:running.config" pattern "running.config"
action 1.2 exit 1
!

4 REPLIES
Blue

Re: EEM to tftp copy code snippets to running config

It seems to me that it may simply need another line between actions 1.1 and 1.2 to respond to the prompt, something along the lines of:

action 1.1 cli command "copy tftp://192.160.11/SNIPPET1.txt system:running.config" pattern "running.config"

action 1.2 cli command "y"
action 1.3 exit 1

New Member

Re: EEM to tftp copy code snippets to running config

hey that worked - thanks

I was trying to do that with the pattern response but it still didn't take it

New Member

Re: EEM to tftp copy code snippets to running config

it works except that you have to use the pattern statement and put

  "running-config" 

in the command for the response to the copy

thank you for gettting me by that

Cisco Employee

Re: EEM to tftp copy code snippets to running config

yjdabear had the answer, but you really shouldn't be using "exit 1" in this policy.  You should just remove that action unless you mean to tell the EEM server that the policy did not complete successfully.

Additionally, if you configure "file prompt quiet" in the running config, many file operations will not longer be interactive, and you will not have to use the pattern syntax.

731
Views
5
Helpful
4
Replies
CreatePlease to create content