There is a timeout
option for the core.remote
action. Run st2 run
core.remote -h
to look at the timeout option. The following is an example.
~/st2$ st2 run core.remote hosts=localhost cmd=date timeout=120
.
id: 5b2abdf21e2e240a543784e7
status: succeeded
parameters:
cmd: date
hosts: localhost
timeout: 120
result:
localhost:
failed: false
return_code: 0
stderr: ''
stdout: Wed Jun 20 20:49:56 UTC 2018
succeeded: true