ansible-role-postgresql/tasks/main.yml
vincent 1fdff1c48b
Some checks failed
continuous-integration/drone/push Build is failing
feat: add consul service
2023-10-31 20:11:28 +01:00

31 lines
770 B
YAML

---
- name: Variable configuration.
include_tasks: variables.yml
- name: Setup/install tasks.
include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
- include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'
- include_tasks: setup-Arch.yml
when: ansible_os_family == 'Archlinux'
- include_tasks: initialize.yml
- include_tasks: configure.yml
- name: Ensure PostgreSQL is started and enabled on boot.
service:
name: "{{ postgresql_daemon }}"
state: "{{ postgresql_service_state }}"
enabled: "{{ postgresql_service_enabled }}"
# Configure PostgreSQL.
- import_tasks: users.yml
- import_tasks: databases.yml
- name: Import Consul service task
ansible.builtin.import_tasks: consul.yml
when: postgres_consul_service