mirror of
https://github.com/geerlingguy/ansible-role-postgresql.git
synced 2024-11-11 13:50:50 -05:00
Merge pull request #24 from emmetog/specify-restart-state
Specify restart state
This commit is contained in:
commit
53d1245169
3 changed files with 12 additions and 1 deletions
|
@ -21,6 +21,10 @@ Available variables are listed below, along with default values (see `defaults/m
|
|||
|
||||
(RHEL/CentOS only) You can set a repo to use for the PostgreSQL installation by passing it in here.
|
||||
|
||||
postgresql_restarted_state: "restarted"
|
||||
|
||||
Set the state of the service when configuration changes are made. Recommended values are `restarted` or `reloaded`.
|
||||
|
||||
postgresql_python_library: python-psycopg2
|
||||
|
||||
Library used by Ansible to communicate with PostgreSQL. If you are using Python 3 (e.g. set via `ansible_python_interpreter`), you should change this to `python3-psycopg2`.
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
# RHEL/CentOS only. Set a repository to use for PostgreSQL installation.
|
||||
postgresql_enablerepo: ""
|
||||
|
||||
# Set postgresql state when configuration changes are made. Recommended values:
|
||||
# `restarted` or `reloaded`
|
||||
postgresql_restarted_state: "restarted"
|
||||
|
||||
postgresql_python_library: python-psycopg2
|
||||
postgresql_user: postgres
|
||||
postgresql_group: postgres
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
- name: restart postgresql
|
||||
service: "name={{ postgresql_daemon }} state=restarted sleep=5"
|
||||
service:
|
||||
name: "{{ postgresql_daemon }}"
|
||||
state: "{{ postgresql_restarted_state }}"
|
||||
sleep: 5
|
||||
|
|
Loading…
Reference in a new issue