diff options
author | Thedro Neely <thedroneely@gmail.com> | 2020-01-09 03:07:29 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2020-01-09 03:07:29 -0500 |
commit | b4cb052dcbe94e74c69381bac7c825eb782381d1 (patch) | |
tree | fc8f452f682b4e65b9a55130992e0d9fed1038d8 /roles/postgresql/main.yml | |
parent | f97c637d0a109e3164b30637e36690719592e512 (diff) | |
download | playbooks-b4cb052dcbe94e74c69381bac7c825eb782381d1.tar.gz playbooks-b4cb052dcbe94e74c69381bac7c825eb782381d1.tar.bz2 playbooks-b4cb052dcbe94e74c69381bac7c825eb782381d1.zip |
roles/postgresql: Add role
Diffstat (limited to 'roles/postgresql/main.yml')
-rw-r--r-- | roles/postgresql/main.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/roles/postgresql/main.yml b/roles/postgresql/main.yml new file mode 100644 index 0000000..2ab2498 --- /dev/null +++ b/roles/postgresql/main.yml @@ -0,0 +1,32 @@ +--- +# 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 + owner: postgres + group: postgres + dest: "{{ config_path }}" + mode: '0600' + - name: Copying client authentication configuration file + copy: + src: pg_hba.conf + owner: postgres + 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 |