- name: Ensure unicorn is stopped remote_user: "{{ deployer_user.name }}" command: bash -lc "sudo monit restart unicorn" when: kill_unicorn - name: Force stop unicorn remote_user: "{{ deployer_user.name }}" command: bash -lc "service unicorn_{{ app_name }} stop" when: kill_unicorn - name: Ensure tmp dir present for unicorn pids file: state=directory path={{be_app_path}}/tmp/unicorn owner={{ deployer_user.name }} - name: Restart Unicorn remote_user: "{{ deployer_user.name }}" command: bash -lc "sudo monit restart unicorn"