diff options
author | Aaron LI <aly@aaronly.me> | 2019-09-19 19:20:02 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-09-19 19:20:02 +0800 |
commit | 826c2e0862fd568a2cc1eb808d8ecb36b1b9a670 (patch) | |
tree | 7bfa1bc029910ff14354a2f9817040f7d4974ad3 /roles | |
parent | 9845ee026fb7515283b42d47fb28cb9693360598 (diff) | |
download | ansible-dfly-vps-826c2e0862fd568a2cc1eb808d8ecb36b1b9a670.tar.bz2 |
shadowsocks: Use the 'service' module instead of ad-hoc command
Diffstat (limited to 'roles')
-rw-r--r-- | roles/shadowsocks/handlers/main.yml | 4 | ||||
-rw-r--r-- | roles/shadowsocks/tasks/main.yml | 4 |
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: |