aboutsummaryrefslogtreecommitdiffstats
path: root/roles/postgres/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/postgres/tasks')
-rw-r--r--roles/postgres/tasks/create_db.yml4
-rw-r--r--roles/postgres/tasks/create_user.yml4
-rw-r--r--roles/postgres/tasks/main.yml2
3 files changed, 5 insertions, 5 deletions
diff --git a/roles/postgres/tasks/create_db.yml b/roles/postgres/tasks/create_db.yml
index 9adb6ee..7a4fe6e 100644
--- a/roles/postgres/tasks/create_db.yml
+++ b/roles/postgres/tasks/create_db.yml
@@ -1,4 +1,4 @@
-- name: ensure miniflux database exists
- shell: createdb -U postgres -O "{{ postgres_db_user }}" "{{ postgres_db_name }}"
+- name: create database # noqa: no-changed-when
+ command: createdb -U postgres -O "{{ postgres_db_user }}" "{{ postgres_db_name }}"
register: result
failed_when: result.rc != 0 and "already exists" not in result.stderr
diff --git a/roles/postgres/tasks/create_user.yml b/roles/postgres/tasks/create_user.yml
index 123070d..4716939 100644
--- a/roles/postgres/tasks/create_user.yml
+++ b/roles/postgres/tasks/create_user.yml
@@ -1,4 +1,4 @@
-- name: ensure miniflux db user exists
- shell: createuser -U postgres "{{ postgres_db_user }}"
+- name: create database user # noqa: no-changed-when
+ command: createuser -U postgres "{{ postgres_db_user }}"
register: result
failed_when: result.rc != 0 and "already exists" not in result.stderr
diff --git a/roles/postgres/tasks/main.yml b/roles/postgres/tasks/main.yml
index d8fe000..78f208c 100644
--- a/roles/postgres/tasks/main.yml
+++ b/roles/postgres/tasks/main.yml
@@ -34,7 +34,7 @@
when: postgres_dir != "/var/postgresql"
# NOTE: this tasks needs `pipelining` set to `false` to work correctly
-- name: init postgres database
+- name: init postgres database # noqa: no-changed-when
command:
cmd: initdb -D "{{ postgres_dir }}/data/" -U "{{ postgres_db_user }}" --encoding=UTF-8 --locale=en_US.UTF-8
chdir: "{{ postgres_dir }}"
remember that computers suck.