Last active
May 18, 2017 08:12
-
-
Save mwiget/5f77416cce02e5e3eaa9bae17fb98289 to your computer and use it in GitHub Desktop.
fetch Junos op script from URL at startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Configure script in Junos: | |
set system scripts op file say-hello.py | |
set system scripts language python | |
Create an event-policy that gets triggered during startup to fetch me: | |
set event-options policy fetch-my-scripts events JTASK_TASK_BEGIN | |
set event-options policy fetch-my-scripts then execute-commands commands "request system scripts refresh-from op file say-hello.py url https://gist.githubusercontent.com/mwiget/5f77416cce02e5e3eaa9bae17fb98289/raw/3db9f896383d8fe8ca087ed1a336bfb33854095f/say-hello.py" | |
''' | |
print "Hi! I'm from GitHubGist." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment