aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/configure-db/tasks/main.yml
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-06-12 16:57:41 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-06-12 16:57:41 +0200
commit914d18b875e7ebcf82264bcaa3030c1daadc5021 (patch)
tree3d9757cee158017c8ff4bb91e608cab559464a20 /ansible/roles/configure-db/tasks/main.yml
parent37474f696485caf64568fba1da09b60b493f737c (diff)
Small fixed to apache conf and postgres commands.
Change-Id: I4c343a8f4f0b1b9409450d32a077c6ede8e8ce9b
Diffstat (limited to 'ansible/roles/configure-db/tasks/main.yml')
-rw-r--r--ansible/roles/configure-db/tasks/main.yml21
1 files changed, 15 insertions, 6 deletions
diff --git a/ansible/roles/configure-db/tasks/main.yml b/ansible/roles/configure-db/tasks/main.yml
index 03f7f2c..587af35 100644
--- a/ansible/roles/configure-db/tasks/main.yml
+++ b/ansible/roles/configure-db/tasks/main.yml
@@ -1,11 +1,20 @@
---
-- name: Create PostgreSQL bugzilla user
- postgresql_user: name={{ db_user }}
- password={{ db_pass }}
- state=present
+# Need to always define 'sudo_user: postgres' or it will not work!
- name: Create PostgreSQL bugzilla database
postgresql_db: name={{ db_name }}
- owner={{ db_user }}
- state=present
+ template=template0
+ encoding=UTF8
+ sudo_user: postgres
+ tags:
+ - db
+- name: Create PostgreSQL bugzilla user
+ postgresql_user: name={{ db_user }}
+ role_attr_flags=NOSUPERUSER,NOCREATEDB
+ password={{ db_pass }}
+ db={{ db_name }}
+ priv=ALL
+ sudo_user: postgres
+ tags:
+ - db