Raw refactoring of roles

This commit is contained in:
2025-05-09 17:47:33 +02:00
parent 82f442f40e
commit 5b47333955
177 changed files with 1483 additions and 1041 deletions

View File

@@ -3,5 +3,5 @@
## Root Access
To access the database via the root account execute the following on the server:
```bash
docker exec -it central-postgres psql -U postgres
docker exec -it "{{ applications.postgres.hostname }}" psql -U postgres
```

View File

@@ -6,7 +6,10 @@ galaxy_info:
Manage your data securely and effectively, making it ideal for production or local development.
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: "Kevin Veen-Birkenbach Consulting & Coaching Solutions"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Docker

View File

@@ -0,0 +1,5 @@
credentials:
postgres_password:
description: "Password for the PostgreSQL superuser 'postgres'"
algorithm: "bcrypt"
validation: "^\\$2[aby]\\$.{56}$"

View File

@@ -8,11 +8,11 @@
- name: Install PostgreSQL
docker_container:
name: central-postgres
name: "{{ applications.postgres.hostname }}"
image: "postgres:{{applications.postgres.version}}"
detach: yes
env:
POSTGRES_PASSWORD: "{{ central_postgres_password }}"
POSTGRES_PASSWORD: "{{ applications.postgres.credentials.postgres_password }}"
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C" # Necessary for docker-matrix
networks:
- name: central_postgres
@@ -31,7 +31,7 @@
when: run_once_docker_postgres is not defined
- name: Wait for Postgres inside the container
shell: docker exec central-postgres pg_isready -U postgres
shell: "docker exec {{ applications.postgres.hostname }} pg_isready -U postgres"
register: pg_ready
until: pg_ready.rc == 0
retries: 30
@@ -52,7 +52,7 @@
name: "{{ database_name }}"
state: present
login_user: postgres
login_password: "{{ central_postgres_password }}"
login_password: "{{ applications.postgres.credentials.postgres_password }}"
login_host: 127.0.0.1
login_port: "{{database_port}}"
@@ -63,7 +63,7 @@
db: "{{ database_name }}"
state: present
login_user: postgres
login_password: "{{ central_postgres_password }}"
login_password: "{{ applications.postgres.credentials.postgres_password }}"
login_host: 127.0.0.1
login_port: "{{database_port}}"
@@ -76,7 +76,7 @@
type: table
state: present
login_user: postgres
login_password: "{{ central_postgres_password }}"
login_password: "{{ applications.postgres.credentials.postgres_password }}"
login_host: 127.0.0.1
login_port: "{{database_port}}"
@@ -88,7 +88,7 @@
type: database
state: present
login_user: postgres
login_password: "{{ central_postgres_password }}"
login_password: "{{ applications.postgres.credentials.postgres_password }}"
login_host: 127.0.0.1
login_port: "{{database_port}}"
@@ -102,7 +102,7 @@
schema: public
state: present
login_user: postgres
login_password: "{{ central_postgres_password }}"
login_password: "{{ applications.postgres.credentials.postgres_password }}"
login_host: 127.0.0.1
login_port: "{{database_port}}"
@@ -110,7 +110,7 @@
postgresql_query:
db: "{{ database_name }}"
login_user: postgres
login_password: "{{ central_postgres_password }}"
login_password: "{{ applications.postgres.credentials.postgres_password }}"
login_host: 127.0.0.1
login_port: "{{database_port}}"
query: |

View File

@@ -0,0 +1,2 @@
# Please set an version in your inventory file - Rolling release for postgres isn't recommended
version: "latest"

View File

@@ -0,0 +1,2 @@
application_id: postgres
hostname: central-postgres