-
Notifications
You must be signed in to change notification settings - Fork 93
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
postgresql_pg_hba: bulk rule editing #303
postgresql_pg_hba: bulk rule editing #303
Conversation
…", "rules_behavior", "overwrite"
… values as not-set
… "rules_behavior" and "overwrite"
Python 2.6 is EOL for 8 years now, does it still need to be supported by this module? |
I would say 'no' but I defer to @Andersson007 |
The collection requirements require at least 2.7 support but if there's no good reason to introduce Python 2.6 incompatible changes, i wouldn't do it (though it's only my opinion and we can vote on it if needed). |
@betanummeric any updates on the remaining failures ? |
The remaining error message occurs here and says:
The test runs in docker image
would not work because |
Skipping or ignoring it with that version sounds OK to me |
The tests are green, this is ready for review. |
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.
@betanummeric thanks for working on this!
I left several general things.
I'm not a user of the module, so would be nice to hear users' / other maintainers' opinions.
@hunleyd @jchancojr do you use the module or do you know someone who uses it and can take a look?
myself @pgguru and @keithf4 use the module at $dayjob. we can take a look |
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Great, thanks! We'll be waiting for you feedback |
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
does this need backported once merged @Andersson007 ? |
Awesome work guys. |
@hunleyd no, it doesn't, thanks for reviewing and merging! |
@betanummeric thanks for the contribution! |
feature PR, fixes #297
add new arguments to postgresql_pg_hba to edit multiple rules at once
argument
rules
A list of objects, specifying a rule for the pg_hba.conf. Each object can have the following keys (the "rule-specific arguments"), which are treated the same as if they were arguments of this module:
address
comment
contype
databases
method
netmask
options
state
users
See
rules_behavior
for what happens when one of these keys missing in arules
item.argument
rules_behavior
String, choices:
conflict
(default),combine
.When
conflict
, andrules
is specified along with at least one normal rule-specific argument, the module fails. This should prevent accidental ambiguous operations. If arules
item is lacking some rule-specific argument, the respective module default is taken.When
combine
, the normal rule-specific arguments are treated as fallback values for the content ofrules
. (They will not add or remove a role on their own.) When a value is neither specified in arules
item nor in the normal rule-specific argument, the module default is taken.example:
argument
overwrite
Boolean, default: false. When true, all pre-existing rules will be removed from the pg_hba.conf as if they where specified with
state: absent
.