--- - name: apt setup tags: - mw-backend - packages block: - copy: dest: /etc/apt/apt.conf.d/99force-ipv4 content: 'Acquire::ForceIPv4 "true";' notify: update apt cache - 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-src http://httpredir.debian.org/debian/ stretch main contrib non-free deb http://security.debian.org/debian-security stretch/updates main contrib non-free deb-src 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-src http://httpredir.debian.org/debian/ stretch-updates main contrib non-free - meta: flush_handlers - 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 - 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 - mediawiki - name: apache config notify: reload apache 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: Semantic MediaWiki tags: - mw-backend - smw block: - name: packages apt: name: "{{ item }}" install_recommends: no with_items: - composer - php-zip - name: directories file: state: directory path: "{{ item }}" owner: root group: root with_items: - /opt/mediawiki - /opt/mediawiki/semantic-media-wiki - name: composer config copy: src: opt/mediawiki/semantic-media-wiki/composer.json dest: /opt/mediawiki/semantic-media-wiki/composer.json - name: run composer become_user: www-data composer: command: install working_dir: /opt/mediawiki/semantic-media-wiki