diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-05 23:18:54 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-05 23:18:54 +0100 |
commit | c25c490677bcba2c2e9fee90db10594bd43f6982 (patch) | |
tree | 23bde01f60bf0e4421f680bcd9912b5a12f5b42d /ansible/roles/mw-backend/tasks | |
parent | b5b7e21c8ba3c68eab9cd244602f27c21aa5f36b (diff) | |
download | infra-c25c490677bcba2c2e9fee90db10594bd43f6982.tar.gz infra-c25c490677bcba2c2e9fee90db10594bd43f6982.tar.bz2 infra-c25c490677bcba2c2e9fee90db10594bd43f6982.tar.xz infra-c25c490677bcba2c2e9fee90db10594bd43f6982.zip |
Importing Bitraf's mediawiki
o Some improvements, reusing old backup scripts.
Diffstat (limited to 'ansible/roles/mw-backend/tasks')
-rw-r--r-- | ansible/roles/mw-backend/tasks/main.yml | 164 |
1 files changed, 0 insertions, 164 deletions
diff --git a/ansible/roles/mw-backend/tasks/main.yml b/ansible/roles/mw-backend/tasks/main.yml deleted file mode 100644 index f5d3e67..0000000 --- a/ansible/roles/mw-backend/tasks/main.yml +++ /dev/null @@ -1,164 +0,0 @@ ---- -- name: apt setup - tags: - - mw-backend - - packages - block: - - file: - dest: /etc/apt/apt.conf.d/99force-ipv4 - state: absent - - name: configure debian repositories - notify: update apt cache - copy: - dest: /etc/apt/sources.list - content: | - deb http://httpredir.debian.org/debian/ stretch main contrib non-free - deb http://security.debian.org/debian-security stretch/updates main contrib non-free - deb http://httpredir.debian.org/debian/ stretch-updates main contrib non-free - deb http://httpredir.debian.org/debian/ stretch-backports main contrib non-free - - - meta: flush_handlers - -# TODO: Remove, use unix-machine instead - - name: packages - apt: - name: "{{ item }}" - install_recommends: no - with_items: - - git - - etckeeper - -- name: system setup - tags: - - mw-backend - - packages - block: - - name: misc packages - apt: - name: "{{ item }}" - install_recommends: no - with_items: - - iputils-ping - - vim-nox - - host - - less - - file: - dest: /var/www/.ansible - state: directory - owner: www-data - mode: u=rwX,go= - -- name: Mediawiki - tags: - - mw-backend - - mediawiki - block: - - name: packages - notify: reload apache - apt: - name: "{{ item }}" - install_recommends: no - with_items: - - git - - php-pgsql - - php-intl - - php-gd - - php-apcu - - composer - - php-zip - - mediawiki # TODO: this should be replaced with composer - - name: /var/www/mw.trygvis.io - tags: apache-config - file: - state: directory - path: "/var/www/mw.trygvis.io" - owner: root - group: root - - name: apache config - notify: reload apache - tags: apache-config - copy: - src: etc/apache2/sites-enabled/000-default.conf - dest: /etc/apache2/sites-enabled/000-default.conf - - name: mediawiki config - template: - src: etc/mediawiki/LocalSettings.php.j2 - dest: /etc/mediawiki/LocalSettings.php - - name: mediawiki job systemd service - notify: systemd daemon-reload - copy: - src: etc/systemd/system/mw-jobqueue.service - dest: /etc/systemd/system/mw-jobqueue.service - - name: mediawiki job systemd timer - notify: systemd daemon-reload - copy: - src: etc/systemd/system/mw-jobqueue.timer - dest: /etc/systemd/system/mw-jobqueue.timer - - systemd: - enabled: true - state: started - name: mw-jobqueue.timer - -- name: Mediawiki extensions - tags: mw-extensions - block: - - name: directories - file: - state: directory - path: /opt/mediawiki/extensions - owner: www-data - group: root - - - name: run composer install scribunto - with_items: "{{ mediawiki_extensions }}" - become: yes - become_user: www-data - composer: - command: require - arguments: "{{ item.package }} {{ item.version }}" - working_dir: /opt/mediawiki/extensions - - - name: symlink extensions into mediawiki - with_items: "{{ mediawiki_extensions }}" - file: - state: link - dest: "/var/lib/mediawiki/extensions/{{ item.extension }}" - src: "/opt/mediawiki/extensions/extensions/{{ item.extension }}" - - - name: symlink maintenance into smw - file: - state: link - dest: "/opt/mediawiki/extensions/maintenance" - src: "/var/lib/mediawiki/maintenance" - owner: root - group: root - -- name: Mediawiki Backup - tags: - - mw-backend - - mediawiki-backup - block: - - name: packages - apt: - name: "{{ item }}" - install_recommends: no - with_items: - - borgbackup - - name: mkdir - file: - state: directory - path: "/opt/mediawiki/backup" - - - name: borgbackup init - shell: borgbackup init -e none /opt/mediawiki/borg - args: - creates: /opt/mediawiki/borg - - - copy: - src: "{{ item }}" - dest: "/{{ item }}" - mode: a+rx - with_items: - - bin/mw-dump-backup - - bin/mw-dump-db - - bin/mw-make-backup |