aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/mw-frontend/tasks
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-02-25 07:15:53 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2018-02-25 07:15:53 +0100
commit37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a (patch)
tree9e5bd01097ccadf6de2ba59dc264df51cd335665 /ansible/roles/mw-frontend/tasks
parent443efffc41984ac604ffa733dd936fecd83006dd (diff)
downloadinfra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.tar.gz
infra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.tar.bz2
infra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.tar.xz
infra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.zip
wip
Diffstat (limited to 'ansible/roles/mw-frontend/tasks')
-rw-r--r--ansible/roles/mw-frontend/tasks/main.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/ansible/roles/mw-frontend/tasks/main.yml b/ansible/roles/mw-frontend/tasks/main.yml
index 40906ea..ee54719 100644
--- a/ansible/roles/mw-frontend/tasks/main.yml
+++ b/ansible/roles/mw-frontend/tasks/main.yml
@@ -1,8 +1,31 @@
---
- name: Apache config
become: yes
+ tags:
+ - mw-frontend
block:
- name: apache config
copy:
src: etc/apache2/sites-available/mw.trygvis.io-ssl.conf
dest: /etc/apache2/sites-available/mw.trygvis.io-ssl.conf
+ - name: packages
+ apt:
+ name: "{{ item }}"
+ install_recommends: no
+ with_items:
+ - python-psycopg2
+ - name: postgresql db
+ become: yes
+ become_user: postgres
+ vars:
+ ansible_ssh_pipelining: true
+ block:
+ - name: CREATE ROLE mediawiki
+ postgresql_user:
+ name: "mediawiki"
+ password: "{{ mediawiki_secrets.mediawiki_password }}"
+ encrypted: yes
+ - name: CREATE DATABASE mediawiki
+ postgresql_db:
+ name: "mediawiki"
+ encoding: "utf-8"