fix: redis_status/disable/enable - add user: root, remove sudo, fix grep exit-1
parent
242af7f86f
commit
8356c11139
|
|
@ -846,22 +846,25 @@ actions:
|
||||||
message: "${response.out}"
|
message: "${response.out}"
|
||||||
redis_status:
|
redis_status:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
|
user: root
|
||||||
commands:
|
commands:
|
||||||
- sudo systemctl list-units --type=service | grep redis
|
- systemctl list-units --type=service | grep -i redis || echo "No Redis service units found"
|
||||||
- return:
|
- return:
|
||||||
type: info
|
type: info
|
||||||
message: "${response.out}"
|
message: "${response.out}"
|
||||||
redis_disable:
|
redis_disable:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
|
user: root
|
||||||
commands:
|
commands:
|
||||||
- sudo systemctl stop redis
|
- systemctl stop redis
|
||||||
- return:
|
- return:
|
||||||
type: info
|
type: info
|
||||||
message: "Redis has been stopped successfully"
|
message: "Redis has been stopped successfully"
|
||||||
redis_enable:
|
redis_enable:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
|
user: root
|
||||||
commands:
|
commands:
|
||||||
- sudo systemctl restart redis
|
- systemctl restart redis
|
||||||
- return:
|
- return:
|
||||||
type: info
|
type: info
|
||||||
message: "Redis has been successfully restarted"
|
message: "Redis has been successfully restarted"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue