Allow changing the restarted state

This commit is contained in:
Emmet O'Grady 2017-08-11 09:42:41 +01:00
parent efd78e5311
commit 111076f599
3 changed files with 9 additions and 1 deletions

View File

@ -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`.

View File

@ -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

View File

@ -2,5 +2,5 @@
- name: restart postgresql
service:
name: "{{ postgresql_daemon }}"
state: restarted
state: "{{ postgresql_restarted_state }}"
sleep: 5