aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/shadowsocks/handlers/main.yml4
-rw-r--r--roles/shadowsocks/tasks/main.yml4
2 files changed, 6 insertions, 2 deletions
diff --git a/roles/shadowsocks/handlers/main.yml b/roles/shadowsocks/handlers/main.yml
index f165bc8..280568b 100644
--- a/roles/shadowsocks/handlers/main.yml
+++ b/roles/shadowsocks/handlers/main.yml
@@ -1,3 +1,5 @@
---
- name: restart-shadowsocks
- command: service shadowsocks restart
+ service:
+ name: shadowsocks
+ state: restarted
diff --git a/roles/shadowsocks/tasks/main.yml b/roles/shadowsocks/tasks/main.yml
index bd22af4..c911135 100644
--- a/roles/shadowsocks/tasks/main.yml
+++ b/roles/shadowsocks/tasks/main.yml
@@ -36,7 +36,9 @@
notify: restart-shadowsocks
- name: start service
- command: service shadowsocks start
+ service:
+ name: shadowsocks
+ state: started
- name: show client-side config
vars: