salt.proxy.ssh_sample
This is a simple proxy-minion designed to connect to and communicate with a server that exposes functionality via SSH. This can be used as an option when the device does not provide an api over HTTP and doesn't have the python stack to run a minion.
-
Method called by grains module.
salt.proxy.ssh_sample.fns()
-
Get the grains from the proxied device
salt.proxy.ssh_sample.grains()
-
Refresh the grains from the proxied device
salt.proxy.ssh_sample.grains_refresh()
-
Required. Can be used to initialize the server connection.
salt.proxy.ssh_sample.init(opts)
-
Since grains are loaded in many different places and some of those places occur before the proxy can be initialized, return whether our init() function has been called
salt.proxy.ssh_sample.initialized()
-
Install a "package" on the ssh server
salt.proxy.ssh_sample.package_install(name, **kwargs)
-
List "packages" by executing a command via ssh This function is called in response to the salt command
salt target_minion pkg.list_pkgs
salt.proxy.ssh_sample.package_list()
-
Remove a "package" on the ssh server
salt.proxy.ssh_sample.package_remove(name)
-
Extract json from out.
- Parameter
-
out: Type string. The data returned by the ssh command.
salt.proxy.ssh_sample.parse(out)
-
Required. Ping the device on the other end of the connection
salt.proxy.ssh_sample.ping()
-
Start a "service" on the ssh server
New in version 2015.8.2.
salt.proxy.ssh_sample.service_list()
-
Restart a "service" on the ssh server
New in version 2015.8.2.
salt.proxy.ssh_sample.service_restart(name)
-
Start a "service" on the ssh server
New in version 2015.8.2.
salt.proxy.ssh_sample.service_start(name)
-
Stop a "service" on the ssh server
New in version 2015.8.2.
salt.proxy.ssh_sample.service_stop(name)
-
Disconnect
salt.proxy.ssh_sample.shutdown(opts)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/proxy/all/salt.proxy.ssh_sample.html