< Cli < ref

mw tools exec

Execute commands as a tool

Synopsis

Tools exec

Allows you to run commands on tools.

This includes running as your user, or as a tool user by specifying –tool

Documentation

mw tools exec [flags] [command & arguments] -- [command flags]

Examples

exec whoami                                                     # Run the whoami command as you on tools
exec --tool=mytool whoami                                       # Run the whoami command as the specified tool
exec --tool=mytool rm foo                                       # Remove the file called foo from the tool
exec --tool=mytool webservice -- --backend=kubernetes start     # Starts a kubernetes webservice on mytool
exec --tool=mytool webservice restart                           # Restart the webservice of mytool
exec --tool=mytool webservice shell                             # Start a shell in a webservice pod for mytool
exec --tool=mytool -- kubectl get pods -o=json 2> /dev/null     # Get JSON output of pods of mytool, ignoring stdout

Options

  -t, --tool string   Tool to execute command on

Options inherited from parent commands

      --help             Help for this command
      --no-interaction   Do not ask any interactive questions
  -v, --verbose count    Increase output verbosity. Example: --verbose=2 or -vv

SEE ALSO

  • mw tools - Interact with any Wikimedia “Tool”
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.