WIP: feat(postgresql): deploy directly (bare-metal)

This commit is contained in:
transcaffeine 2025-01-06 21:08:06 +01:00
parent 02cb20fcc6
commit 818c997853
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,11 @@
---
- name: Ensure postgresql package is {{ postgresql_state }}
ansible.builtin.package:
name: "{{ postgresql_os_package_name }}"
state: "{{ postgresql_state }}"
- name: Ensure postgresql systemd unit is {{ (postgresql_state == 'present') | ternary('enabled', 'disabled') }}
ansible.builtin.systemd:
name: "{{ postgresql_systemd_service_name }}"
enabled: "{{ (postgresql_state == 'present') }}"
when: ansible_facts['service_mgr'] == 'systemd'

View File

@ -4,3 +4,4 @@ postgresql_states:
- absent - absent
postgresql_deployment_methods: postgresql_deployment_methods:
- docker - docker
- local