salt.exec¶
shedule the execution of a command on servers managed by SaltStack
Exemple d’utilisation via l’API HTTP¶
curl -v -X 'POST' -d '{"kwargs":{"servername":"*", "salt_command":"cmd.run","salt_args":"ls /tmp"}}' http://localhost:30005/api/v1/salt.exec
| Type de message: | |
|---|---|
| rpc | |
| Utilisable via l’API Gateway: | |
| oui | |
| Domaine fonctionnel: | |
| execution-domain | |
Paramètres nommés¶
- client_mode
Description: execution mode of the command Type: String Requis: non - salt_command
Description: SaltStack command to execute Type: String Requis: oui - servername
Description: ID of the target servers which will execute the command Type: String Requis: oui - salt_args
Description: parameter of the SaltStack command Type: String Requis: non
Réponse¶
Paramètres nommés¶
- return
Description: information about the job sheduled by SaltStack Type: Array of Object