Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give the possibility to pass extensions options to the config template #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ postgresql_user_privileges:
db: foobar # database
priv: "ALL" # privilege string format: example: INSERT,UPDATE/table:SELECT/anothertable:ALL
role_attr_flags: "CREATEDB" # role attribute flags

# Track execution statistics of all SQL statements executed (optional)
postgresql_extensions_options:
pg_stat_statements.track: all
```

There's a lot more knobs and bolts to set, which you can find in the defaults/main.yml
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,3 +683,6 @@ postgresql_pgdg_dists:
postgresql_version_terse: "{{ postgresql_version | replace('.', '') }}"
postgresql_yum_repository_base_url: "http://yum.postgresql.org"
postgresql_yum_repository_url: "{{ postgresql_yum_repository_base_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}/pgdg-{{ postgresql_pgdg_dists[ansible_distribution] }}{{ postgresql_version_terse }}-{{ postgresql_version }}-2.noarch.rpm"

# Dictionary of options from loaded extensions (optional)
postgresql_extensions_options: {}
3 changes: 3 additions & 0 deletions templates/postgresql.conf-9.2.j2
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,6 @@ restart_after_crash = {{'on' if postgresql_restart_after_crash else 'off'}} # r
#------------------------------------------------------------------------------

# Add settings for extensions here
{% for key, value in postgresql_extensions_options.items() %}
{{key}} = {{value}}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/postgresql.conf-9.3.j2
Original file line number Diff line number Diff line change
Expand Up @@ -599,3 +599,6 @@ include_dir = 'conf.d' # include files ending in '.conf' from
#------------------------------------------------------------------------------

# Add settings for extensions here
{% for key, value in postgresql_extensions_options.items() %}
{{key}} = {{value}}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/postgresql.conf-9.4.j2
Original file line number Diff line number Diff line change
Expand Up @@ -617,3 +617,6 @@ include_dir = 'conf.d' # include files ending in '.conf' from
#------------------------------------------------------------------------------

# Add settings for extensions here
{% for key, value in postgresql_extensions_options.items() %}
{{key}} = {{value}}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/postgresql.conf-9.5.j2
Original file line number Diff line number Diff line change
Expand Up @@ -621,3 +621,6 @@ include_dir = 'conf.d' # include files ending in '.conf' from
#------------------------------------------------------------------------------

# Add settings for extensions here
{% for key, value in postgresql_extensions_options.items() %}
{{key}} = {{value}}
{% endfor %}