update-frontend-prod now works whether the app is already running or not
parent
9906ac0691
commit
043dc3e40e
|
@ -32,7 +32,6 @@ $ ansible-playbook -i hosts refresh-frontend-cert.yml --key-file="/path/to/key/o
|
|||
```
|
||||
|
||||
### TODO
|
||||
1. Fix error in update-frontend-prod where playbook fails if Flask app isn't already running
|
||||
2. Complete setup-frontend-prod.yml
|
||||
3. Automate installation of Python 3.7 and pip3
|
||||
4. Setup Ansible Vault to handle keys
|
||||
1. Complete setup-frontend-prod.yml
|
||||
2. Automate installation of Python 3.7 and pip3
|
||||
3. Setup Ansible Vault to handle keys
|
|
@ -1,14 +1,9 @@
|
|||
- hosts: cce_frontend_prod
|
||||
tasks:
|
||||
|
||||
- name: Check if app is running
|
||||
shell: "ps -few | grep 'flask run' | wc -l"
|
||||
register: num_matches
|
||||
|
||||
# TODO: This command ignores the conditional
|
||||
- name: Bring down current instance if running
|
||||
- name: Bring down the app if it is running (ignore error msg)
|
||||
command: "killall flask"
|
||||
when: num_matches.stdout != "1"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Pull from GitHub
|
||||
git:
|
||||
|
|
Loading…
Reference in New Issue