summaryrefslogtreecommitdiff
path: root/roles/healthchecks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/healthchecks/main.yml')
-rw-r--r--roles/healthchecks/main.yml28
1 files changed, 27 insertions, 1 deletions
diff --git a/roles/healthchecks/main.yml b/roles/healthchecks/main.yml
index ed41d76..c8f2e90 100644
--- a/roles/healthchecks/main.yml
+++ b/roles/healthchecks/main.yml
@@ -71,7 +71,9 @@
./manage.py migrate
args:
chdir: "{{ healthchecks_home }}"
- creates: hc.sqlite
+ changed_when: false
+ register: output
+ - debug: var=output
- name: Setting up application assets
blockinfile:
@@ -101,6 +103,21 @@
SECRET = "{{ secret_key }}"
create: yes
+ - name: Performing maintenance
+ shell: |
+ . bin/activate
+ ./manage.py prunepings
+ ./manage.py prunenotifications
+ ./manage.py pruneusers
+ ./manage.py prunetokenbucket
+ ./manage.py pruneflips
+ ./manage.py compress
+ args:
+ chdir: "{{ healthchecks_home }}"
+ changed_when: false
+ register: output
+ - debug: var=output
+
become: true
become_user: "{{ healthchecks_user }}"
@@ -120,3 +137,12 @@
- name: Waiting for supervisor to become active
wait_for:
port: 9100
+
+ - name: Waiting for application to become active
+ wait_for:
+ port: 8000
+
+ - name: Testing if page exists
+ uri:
+ url: http://0.0.0.0:8000
+ return_content: yes