aboutsummaryrefslogtreecommitdiffstats
path: root/roles/postgres
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-12-12 22:15:01 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-12-12 22:15:01 +0100
commitdb698b595e7ff088c96d00ef5285a0d634aff1be (patch)
tree4ec4242098a774e0de7ae1a4637b45b949e4ecce /roles/postgres
parentee3e324680a15d59429b1a2a0615fe787d169068 (diff)
downloadrules-db698b595e7ff088c96d00ef5285a0d634aff1be.tar.gz
refactor: pass ansible-lint with yaml header
Diffstat (limited to 'roles/postgres')
-rw-r--r--roles/postgres/defaults/main.yml2
-rw-r--r--roles/postgres/tasks/create_db.yml2
-rw-r--r--roles/postgres/tasks/create_user.yml2
-rw-r--r--roles/postgres/tasks/main.yml2
4 files changed, 8 insertions, 0 deletions
diff --git a/roles/postgres/defaults/main.yml b/roles/postgres/defaults/main.yml
index 963e594..856ac50 100644
--- a/roles/postgres/defaults/main.yml
+++ b/roles/postgres/defaults/main.yml
@@ -1,3 +1,5 @@
+---
+
postgres_dir: /data/postgresql
postgres_default_dir: /var/postgresql
postgres_user: _postgresql
diff --git a/roles/postgres/tasks/create_db.yml b/roles/postgres/tasks/create_db.yml
index 5f8db70..d2f3676 100644
--- a/roles/postgres/tasks/create_db.yml
+++ b/roles/postgres/tasks/create_db.yml
@@ -1,3 +1,5 @@
+---
+
- name: create database # noqa: no-changed-when
ansible.builtin.command: createdb -U postgres -O "{{ postgres_db_user }}" "{{ postgres_db_name }}"
register: result
diff --git a/roles/postgres/tasks/create_user.yml b/roles/postgres/tasks/create_user.yml
index 483e507..793676e 100644
--- a/roles/postgres/tasks/create_user.yml
+++ b/roles/postgres/tasks/create_user.yml
@@ -1,3 +1,5 @@
+---
+
- name: create database user # noqa: no-changed-when
ansible.builtin.command: createuser -U postgres "{{ postgres_db_user }}"
register: result
diff --git a/roles/postgres/tasks/main.yml b/roles/postgres/tasks/main.yml
index 8046d40..302fba4 100644
--- a/roles/postgres/tasks/main.yml
+++ b/roles/postgres/tasks/main.yml
@@ -1,3 +1,5 @@
+---
+
- name: install postgres
ansible.builtin.package:
name:
remember that computers suck.