summaryrefslogtreecommitdiff
path: root/roles/postgresql/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/postgresql/main.yml')
-rw-r--r--roles/postgresql/main.yml9
1 files changed, 7 insertions, 2 deletions
diff --git a/roles/postgresql/main.yml b/roles/postgresql/main.yml
index 2ab2498..0c291a5 100644
--- a/roles/postgresql/main.yml
+++ b/roles/postgresql/main.yml
@@ -1,16 +1,19 @@
---
-# Target: alpine3.11
- name: Install PostgreSQL server
hosts: postgresql
+
vars:
config_path: /etc/postgresql
+
tasks:
+
- name: Installing the application
apk:
state: present
update_cache: yes
name:
- postgresql
+
- name: Copying main configuration file
copy:
src: postgresql.conf
@@ -18,6 +21,7 @@
group: postgres
dest: "{{ config_path }}"
mode: '0600'
+
- name: Copying client authentication configuration file
copy:
src: pg_hba.conf
@@ -25,8 +29,9 @@
group: postgres
dest: "{{ config_path }}"
mode: '0600'
+
- name: Ensuring PostgreSQL has been enabled and started
service:
name: postgresql
state: started
- enabled: yes \ No newline at end of file
+ enabled: yes