ansible-role-postgresql/tasks/postgresql-service-status.yml

12 lines
362 B
YAML
Raw Normal View History

2020-06-03 19:53:13 +02:00
---
- name: Ensure that the postgresql server is started
service: name=postgresql state=started enabled=yes
when: postgresql_enabled
tags: [ 'postgresql', 'postgres' ]
- name: Ensure that the postgresql server is stopped and disabled
service: name=postgresql state=stopped enabled=no
when: not postgresql_enabled
tags: [ 'postgresql', 'postgres' ]