Update playbook to comply with new service-based deployment

master
Dylan DiGeronimo 2020-04-23 17:22:38 -04:00
parent 6a23f3f277
commit ed94da9286
1 changed files with 4 additions and 5 deletions

View File

@ -2,8 +2,9 @@
tasks:
- name: Bring down the app if it is running (ignore error msg)
command: "killall flask"
become: true
ignore_errors: true
command: "systemctl stop cce-search-frontend"
- name: Pull from GitHub
git:
@ -31,8 +32,6 @@
when:
- ('No virtualenv' in pipenv_venv_check_cmd.stderr)
# Source: https://ansibledaily.com/execute-detached-process-with-ansible/
- name: Launch app
shell: "(nohup pipenv run flask run </dev/null >/dev/null 2>&1 &)"
args:
chdir: "{{ frontend_project_path }}"
become: true
command: "systemctl start cce-search-frontend"