Running Custom Script from CLI with arguments #20198
Closed
dionrowney
started this conversation in
General
Replies: 2 comments
-
Hi there! You’re very close. That error occurs because
Also, the JSON you pass to Example: (venv) $ python3 manage.py runscript --data '{"foo": "somevalue", "bar": 123}' --commit my_module.MyScript |
Beta Was this translation helpful? Give feedback.
0 replies
-
That worked. the example should be more like:
thanks!! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a script that I run via the GUI normally and want to run via the Linux CLI. It has 2 required arguments it takes. How do I pass those into the script at the CLI?
I have read the docs on this located here: https://netboxlabs.com/docs/netbox/customization/custom-scripts/#via-the-cli and it provides an example but does not provide an example of an argument being passed to the script being run.
When I run like I expect I get:
What is correct way to do this?
Beta Was this translation helpful? Give feedback.
All reactions