Commit ee8cddd9 authored by Lars Beckers's avatar Lars Beckers
Browse files

Merge branch 'bullseye' into 'master'

Bullseye Compatibility

See merge request !3
parents e4f160cc 4a483e42
Pipeline #2921 passed with stage
in 36 seconds
......@@ -5,12 +5,19 @@
apt:
name:
- mariadb-server
- python-mysqldb
- python3-mysqldb
state: present
tags:
- packages
- mysql
- name: ensure legacy mysql packages are installed
apt:
name:
- python-mysqldb
state: present
when: ansible_distribution_major_version|int(default=99) < 11
- name: ensure mysql is started
service:
name: mysql
......
#!/bin/sh
for DB in $(sudo -u postgres psql -t -q -A -c "select datname from pg_catalog.pg_database where not datname like 'template%';")
do
sudo -u postgres pg_dump $DB | gzip -c -- > ${DB}.sql.gz
done
sudo -u postgres pg_dumpall -g -U postgres | gzip -c -- > pg_dumpall.sql.gz
......@@ -19,11 +19,17 @@
name:
# yamllint disable-line rule:line-length
- postgresql{{ "-{}".format(postgres_version) if postgres_version is defined }}
- python-psycopg2
- python3-psycopg2
- libpq-dev
state: present
- name: ensure legacy postgres packages are installed
apt:
name:
- python-psycopg2
state: present
when: ansible_distribution_major_version|int(default=99) < 11
- name: ensure postgres is started
service:
name: postgresql
......@@ -32,8 +38,8 @@
- name: ensure we have our postgres backup script
copy:
src: pgbackup.sh
dest: /usr/local/bin/
src: "pgbackup{{ '-bullseye' if ansible_distribution_major_version|int(default=99) > 10 else '' }}.sh"
dest: /usr/local/bin/pgbackup.sh
owner: root
group: root
mode: '0755'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment