diff --git a/README.md b/README.md index f52d76a..4e8a413 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ config: permissions: '0600' content: !!binary | H4sICCW ... 🔒 gzipped and base64-encoded private key, registered as - deploy key in Gitea, in both the odoo_running_code and - ansible-role-odoo8container repos. ... AAA== + deploy key in Gitea, in both the odoo14_running_code and + ansible-role-odoo14 repos. ... AAA== - encoding: gzip owner: root:root path: /root/.ssh/id_ed25519.pub @@ -34,6 +34,14 @@ config: content: !!binary | H4sICPS ... 🔒 gzipped and base64-encoded host key for gitea ... AAA== runcmd: - - [ ansible-pull, -U, "ssh://git@gitea.agofer.net:22001/jegomez/ansible-role-odoo14-lxd.git" ] + - [ ansible-pull, -U, "ssh://git@gitea.agofer.net:22001/jegomez/ansible-role-odoo14.git" ] description: LXD profile for Odoo 14 ``` + +## Healthchecks integration + + + +The role _pings_ our **Healthchecks** server, as proof of a successful +database restore. + diff --git a/local.yml b/local.yml index cdd308e..02af8e6 100644 --- a/local.yml +++ b/local.yml @@ -1,7 +1,23 @@ - hosts: localhost gather_facts: yes user: root + + pre_tasks: + + - name: Register the start of the restore with Healthchecks server + uri: + url: '{{ postgresqlrestore_check_url }}/start' + roles: - odoo + + post_tasks: + + - name: Register a successful restore with Healthchecks server + uri: + url: '{{ postgresqlrestore_check_url }}' + method: POST + body: '{{ ansible_hostname }}.{{ dominio }}' + vars: dominio: agofer.net diff --git a/roles/odoo/vars/main/main.yml b/roles/odoo/vars/main/main.yml index 06c5fb9..bb8dfc9 100644 --- a/roles/odoo/vars/main/main.yml +++ b/roles/odoo/vars/main/main.yml @@ -8,6 +8,8 @@ sourcecode_location: 'ssh://git@gitea.agofer.net:22001/Agofer/odoo14_running_cod database_location: 'rsync://backups.bogota.agofer/db14/db_odoo_agofer.gz' +postgresqlrestore_check_url: 'https://check.agofer.net/ping/cf93353e-9601-4b62-8020-711a1913a505' + apt_packages: - build-essential - nginx