Update to 2020-12-08 12:00

master
Daniel Berteaud 4 years ago
parent 6be0f6bb32
commit d05125afc1
  1. 3
      roles/squid/files/acl/software_various.domains
  2. 2
      roles/wapt_server/meta/main.yml
  3. 26
      roles/wapt_server/tasks/main.yml
  4. 2
      roles/wapt_server/templates/post-backup.sh.j2
  5. 8
      roles/wapt_server/templates/pre-backup.sh.j2
  6. 7
      roles/wapt_server/vars/CentOS-7.yml
  7. 7
      roles/wapt_server/vars/CentOS-8.yml

@ -328,3 +328,6 @@ download1.rpmfusion.org
# Composer
getcomposer.org
# Sentry
downloads.sentry-cdn.com

@ -1,3 +1,5 @@
---
dependencies:
- role: repo_wapt
- role: postgresql_server
when: wapt_db_server in ['localhost','127.0.0.1']

@ -1,16 +1,14 @@
---
- name: Install packages
yum:
name:
- tis-waptserver
- tis-waptsetup
- postgresql13
- python-psycopg2 # Needed to manage PG with ansible
- include_vars: "{{ item }}"
with_first_found:
- vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml
- vars/{{ ansible_distribution }}.yml
- vars/{{ ansible_os_family }}.yml
tags: wapt
- include_tasks: postgresql.yml
when: wapt_db_server == '127.0.0.1' or wapt_db_server == 'localhost'
- name: Install packages
yum: name={{ wapt_packages }}
tags: wapt
- name: Create directories
@ -18,6 +16,8 @@
loop:
- path: /opt/wapt/meta
mode: 700
- path: /opt/wapt/backup
mode: 700
- path: /var/www/html/ssl
mode: 750
owner: wapt
@ -200,7 +200,7 @@
tags: wapt
- name: Create DB dump directory
file: path=/opt/wapt/db_dumps state=directory mode=0700
file: path=/opt/wapt/backup state=directory mode=0700
tags: wapt
- name: Deploy pre and post backup scripts
@ -209,3 +209,9 @@
- pre
- post
tags: wapt
- name: Remove tmp and obsolete files
file: path={{ item }} state=absent
loop:
- /opt/wapt/db_dumps
tags: wapt

@ -1,3 +1,3 @@
#!/bin/sh
rm -f /opt/wapt/db_dumps/*
rm -f /opt/wapt/backup/*

@ -1,8 +1,8 @@
#!/bin/sh
PGPASSWORD='{{ wapt_db_pass }}' /usr/pgsql-11/bin/pg_dump \
PGPASSWORD={{ wapt_db_pass | quote }} /usr/pgsql-13/bin/pg_dump \
--clean \
--create \
--username={{ wapt_db_user }} \
--host={{ wapt_db_server }} \
{{ wapt_db_name }} | lz4 -c > /opt/wapt/db_dumps/{{ wapt_db_name }}.sql.lz4
--username={{ wapt_db_user | quote }} \
--host={{ wapt_db_server | quote }} \
{{ wapt_db_name | quote }} | zstd -c > /opt/wapt/backup/{{ wapt_db_name }}.sql.zst

@ -0,0 +1,7 @@
---
wapt_packages:
- tis-waptserver
- tis-waptsetup
- postgresql13
- python-psycopg2 # Needed to manage PG with ansible

@ -0,0 +1,7 @@
---
wapt_packages:
- tis-waptserver
# - tis-waptsetup
- postgresql13
- python3-psycopg2 # Needed to manage PG with ansible
Loading…
Cancel
Save