-
Notifications
You must be signed in to change notification settings - Fork 284
Make local backup of pg_hba.conf
file before modification
#138
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
Conversation
Any specific reason to choose the local copy of pg_hba to |
Yeah, there is a reason. Good question, thanks! 👍 The The That's why I "emulated" the behavior of |
Ok, I thought that |
pillar.example
Outdated
{%- if 'status.time' in salt.keys() %} | ||
postgresconf_backup: ".backup@{{ salt['status.time']('%y-%m-%d_%H:%M:%S') }}" | ||
{%- endif %} | ||
listen_addresses = '*' # listen on all interfaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there was an indentation change with list_addresses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely not on purpose, should be fixed before merge, but it's just for the example. Might cause confusion however.. It's also missing the -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, I guess I switched context too often and started to mix things :)
Indeed, YAML (and SLS) literal style scalars should be indented exactly with two spaces. Fixed, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And since it is just a multi-line string which is directly used in the file.blockreplace
context
parameter in the same way (literal style), there should be no -
list indicator.
@javierbertoli, could you please review this? Many thanks. |
This PR enables local backup creation of modified
pg_hba.conf
file by default.The
config_backup
Pillar setting has been introduced to trigger backup for all modified PostgreSQL server configuration files (postgresconf
andpg_hba.conf
).It's very basic and useful feature, I think. @BABILEN or @javierbertoli , could you please review this? Thank you.