diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-24 22:28:42 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-24 22:28:42 +0100 |
commit | 6fe44ad6366232314d45502d387ccbc671e84d9f (patch) | |
tree | 216b04b2fa189d6b1af04740d327ee2a3827c5d9 /ansible/roles | |
parent | f985755b32cc3f3558604264823de32de557b288 (diff) | |
download | infra-6fe44ad6366232314d45502d387ccbc671e84d9f.tar.gz infra-6fe44ad6366232314d45502d387ccbc671e84d9f.tar.bz2 infra-6fe44ad6366232314d45502d387ccbc671e84d9f.tar.xz infra-6fe44ad6366232314d45502d387ccbc671e84d9f.zip |
o Mediawiki.
Diffstat (limited to 'ansible/roles')
-rw-r--r-- | ansible/roles/mediawiki-database/tasks/main.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ansible/roles/mediawiki-database/tasks/main.yml b/ansible/roles/mediawiki-database/tasks/main.yml new file mode 100644 index 0000000..8680830 --- /dev/null +++ b/ansible/roles/mediawiki-database/tasks/main.yml @@ -0,0 +1,37 @@ +- tags: + - mediawiki-database + - packages + become: yes + block: + - name: packages + become: + with_items: + - python-psycopg2 # required for the next block + apt: + name: "{{ item }}" + install_recommends: no + +- tags: mediawiki-database + become: yes + become_user: postgres + vars: + ansible_ssh_pipelining: true + block: + - name: pg user mediawiki + tags: update-password + postgresql_user: + name: "{{ credentials.username }}" + password: "{{ credentials.password }}" + encrypted: yes + - name: pg db mediawiki + postgresql_db: + name: "{{ credentials.database }}" + encoding: utf-8 + owner: "{{ credentials.username }}" + - postgresql_privs: + database: "{{ credentials.database }}" + state: present + privs: USAGE + type: schema + objs: public + roles: "{{ credentials.username }}" |