cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
1687
Views
5
Helpful
4
Replies

EEM to tftp copy code snippets to running config

jschweng
Level 1
Level 1

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 4

yjdabear
VIP Alumni
VIP Alumni

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

hey that worked - thanks

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

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

Joe Clarke
Cisco Employee
Cisco Employee

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.