aboutsummaryrefslogtreecommitdiffstats
path: root/roles/postgres/tasks/create_db.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-12 16:47:23 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-12 16:47:23 +0000
commit04855031e0e3a74b98e59167ba5da91e077dab48 (patch)
treefd03eb9e7c04b5a422753174dccf7b43b1a0ff66 /roles/postgres/tasks/create_db.yml
parentc7bce9fa368ac4f45e3ca45bc8a03cff547d9cd1 (diff)
downloadrules-04855031e0e3a74b98e59167ba5da91e077dab48.tar.gz
roles: Add postgresql
Diffstat (limited to 'roles/postgres/tasks/create_db.yml')
-rw-r--r--roles/postgres/tasks/create_db.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/postgres/tasks/create_db.yml b/roles/postgres/tasks/create_db.yml
new file mode 100644
index 0000000..9adb6ee
--- /dev/null
+++ b/roles/postgres/tasks/create_db.yml
@@ -0,0 +1,4 @@
+- name: ensure miniflux database exists
+ shell: createdb -U postgres -O "{{ postgres_db_user }}" "{{ postgres_db_name }}"
+ register: result
+ failed_when: result.rc != 0 and "already exists" not in result.stderr
remember that computers suck.