aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-09-19 19:20:31 +0800
committerAaron LI <aly@aaronly.me>2019-09-19 19:20:31 +0800
commitcaf8ed1ae70847db939700f81bb8288217f9e32b (patch)
tree2c84017cecf9ecf205d2e343c60954b4fe478934
parent826c2e0862fd568a2cc1eb808d8ecb36b1b9a670 (diff)
downloadansible-dfly-vps-caf8ed1ae70847db939700f81bb8288217f9e32b.tar.bz2
bootstrap: Use the 'service' module instead of ad-hoc command
-rw-r--r--roles/bootstrap/handlers/main.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/bootstrap/handlers/main.yml b/roles/bootstrap/handlers/main.yml
index 6ecf94f..eddd40e 100644
--- a/roles/bootstrap/handlers/main.yml
+++ b/roles/bootstrap/handlers/main.yml
@@ -1,3 +1,5 @@
---
- name: restart-sshd
- command: service sshd restart
+ service:
+ name: sshd
+ state: restarted