From acbe5d24c07f4a5b255e49381888cc531a4c8e48 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 31 Aug 2015 08:11:03 +0800 Subject: [PATCH] update playbook --- shadowsocks/playbook.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/shadowsocks/playbook.yml b/shadowsocks/playbook.yml index c808fc0..03298b5 100644 --- a/shadowsocks/playbook.yml +++ b/shadowsocks/playbook.yml @@ -17,6 +17,11 @@ update_cache: yes state: latest + - name: ensure docker is running + service: + name: docker + state: started + - name: ensure pip is installed shell: 'curl -sSL https://bootstrap.pypa.io/get-pip.py | python2' args: @@ -29,11 +34,6 @@ executable: pip2 state: present - - name: ensure docker is running - service: - name: docker - state: started - - name: ensure shadowsocks is started docker: name: shadowsocks @@ -46,3 +46,10 @@ PASSWORD: "{{password}}" restart_policy: always state: started + + - name: wait for shadowsocks + wait_for: + host: "{{ansible_eth0.ipv4.address}}" + port: "{{port}}" + delay: 5 +