7 Commits

8 changed files with 28 additions and 5 deletions

View File

@ -1,12 +1,13 @@
namespace: finallycoffee
name: databases
version: 0.1.1
version: 0.1.3
readme: README.md
authors:
- transcaffeine <transcaffeine@finally.coffee>
description: Collection for deploying and configuring databases
dependencies:
"community.docker": "^3.0.0"
"community.docker": "^4.0.0"
"community.postgresql": "^3.9.0"
license_file: LICENSE.md
build_ignore:
- '*.tar.gz'

View File

@ -1,5 +1,5 @@
---
elasticsearch_version: "8.17.0"
elasticsearch_version: "8.17.2"
elasticsearch_state: present
elasticsearch_base_path: /opt/elasticsearch

View File

@ -1,5 +1,5 @@
---
mariadb_version: "10.11.10"
mariadb_version: "10.11.11"
mariadb_base_path: /var/lib/mariadb
mariadb_data_path: >-2
{{ mariadb_base_path }}/{{ mariadb_version | split('.') | first }}

View File

@ -3,6 +3,24 @@
PostgreSQL is the self proclaimed "world's most advanced" open source relational
database. This ansible role can deploy and configure postgresql.
By default, the role configures the remote's effective ansible user with
peer authentication for the (postgresql) role `postgres` on all databases (with all grants).
## Required configuration
Set `postgresql_superuser_password` to your superusers desired password.
## Optional configuration
Set `postgresql_major_version` to your desired postgresql major version,
for supported major versions see [`defaults/main/main.yml`](defaults/main/main.yml#L6).
This role can be executed multiple times with different
`postgresql_major_version` values to provide new database versions for up-to-
date applications and older versions for software which does not yet support
them. Container name and host mounts encode the major version to prevent
accidental usage of the 'wrong' `PGDATA` directory.
## Requirements
- `psycopg2` (pip) package

View File

@ -50,6 +50,7 @@
loop_control:
loop_var: result
label: "{{ result.option.key }}"
when: postgresql_state == 'present'
vars:
postgresql_login_host: >-2
{{

View File

@ -33,6 +33,7 @@
loop:
- name: "{{ postgresql_config_path }}"
- name: "{{ postgresql_data_path }}"
mode: "0700"
loop_control:
loop_var: path
label: "{{ path.name }}"

View File

@ -22,6 +22,7 @@
insert_after: "# Ansible managed"
line: "{{ postgresql_admin_pg_ident_conf }}"
when: postgresql_state == 'present'
notify: postgresql_restart
- name: Configure permissions for postgresql admin role
community.postgresql.postgresql_pg_hba:
@ -31,3 +32,4 @@
method: "{{ postgresql_admin_role_method }}"
options: "{{ postgresql_admin_pg_hba_conf_options }}"
when: postgresql_state == 'present'
notify: postgresql_restart

View File

@ -1,5 +1,5 @@
---
valkey_version: "8.0.1"
valkey_version: "8.0.2"
valkey_state: "present"
valkey_instance: ~
valkey_instance_suffix: >-2