From 0a6da2506c38681f7138f3787c6f0dd20696ad0d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 23 Sep 2018 01:10:23 +0200 Subject: o Adding back mw-backend role for mw.yml. o Adding backup scripts for mediawiki. o Fixing broken Debian logo. o Adding .pdf as valid file updload type. --- ansible/roles/mw-backend/tasks/main.yml | 37 ++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'ansible/roles/mw-backend/tasks') diff --git a/ansible/roles/mw-backend/tasks/main.yml b/ansible/roles/mw-backend/tasks/main.yml index d1abd8c..497fad2 100644 --- a/ansible/roles/mw-backend/tasks/main.yml +++ b/ansible/roles/mw-backend/tasks/main.yml @@ -4,10 +4,9 @@ - mw-backend - packages block: - - copy: + - file: dest: /etc/apt/apt.conf.d/99force-ipv4 - content: 'Acquire::ForceIPv4 "true";' - notify: update apt cache + state: absent - name: configure debian repositories notify: update apt cache copy: @@ -97,6 +96,38 @@ state: started name: mw-jobqueue.timer +- name: Mediawiki Backup + tags: + - mw-backend + - mediawiki-backup + block: + - name: packages + apt: + name: "{{ item }}" + install_recommends: no + with_items: + - borgbackup + - name: mkdir + with_items: + - /mediawiki-backup + file: + state: directory + path: "{{ item }}" + + - name: borgbackup init + shell: borgbackup init -e none /mediawiki-borg + args: + creates: /mediawiki-borg + + - copy: + src: "{{ item }}" + dest: "/{{ item }}" + mode: a+rx + with_items: + - bin/mw-dump-backup + - bin/mw-dump-db + - bin/mw-make-backup + - name: Semantic MediaWiki tags: - mw-backend -- cgit v1.2.3