Skip to content

Make postgres log directory mode configurable #596

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

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
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ postgresql_logging_collector: off
# These are only used if logging_collector is on:
# Directory where log files are written, can be absolute or relative to PGDATA
postgresql_log_directory: "log"
# Permissions of the postgresql log directory
postgresql_log_directory_mode: "0700"
# Log file name pattern, can include strftime() escapes
postgresql_log_filename: "postgresql-%Y-%m-%d_%H%M%S.log"
postgresql_log_file_mode: "0600" # begin with 0 to use octal notation
Expand Down
2 changes: 1 addition & 1 deletion tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
owner: "{{ postgresql_service_user }}"
group: "{{ postgresql_service_group }}"
state: directory
mode: 0700
mode: "{{ postgresql_log_directory_mode }}"
register: pglog_dir_exist
when: postgresql_log_directory != "pg_log" or postgresql_log_directory != "log"

Expand Down