pdns-ansible icon indicating copy to clipboard operation
pdns-ansible copied to clipboard

Feat(postgresql): Add support for postgresql backend (including tests)

Open Exchizz opened this issue 1 year ago • 8 comments

Hi,

I have a use case where I would like to use postgressql as a backend for pdns.

This PR finishes the work started by #104

I've made the following changes:

  • Minor changes to #104

  • Add tests to the postgresSQL ansible code (I've added tests similar to what is tested with MySQL backend)

    • Added a PostgreSQL service to test creation of postgresql user/database/schemas
  • Added "throttle:1" to both MySQL and PostgreSQL user creation module. Occasionally the tasks failed and I'm assuming it's because of race-conditions. (For both MySQL and PostgreSQL, a user with the same name is created multiple times (foreach distro in the tests) and assigned permissions/privileges)

  • Added support for PostgreSQL's Host Based Authentication. This can be used when PowerDNS Authoritative server is installed on the same host as the PostgreSQL server. In that case, Ansible does not need a privileged PostgreSQL user to create a user for PowerDNS. It will simply use the unix socket and use become "postgresql". This is unfortunately not covered by any tests.

Exchizz avatar Apr 01 '24 12:04 Exchizz

You could have kept my commit. To me this is borderline copyright infringement.

commonism avatar Apr 05 '24 20:04 commonism

@commonism Your contribution is licensed under the MIT license. It explicitly allows merging code without attribution.

You can discuss open source etiquette if you want, but legalities have nothing to do with it.

birjj avatar Apr 05 '24 21:04 birjj

Hi @commonism,

Done

Exchizz avatar Apr 06 '24 20:04 Exchizz

@commonism Your contribution is licensed under the MIT license. It explicitly allows merging code without attribution.

I thought this was MIT-0, but well, can you point me to somewhere to read up on this?

You can discuss open source etiquette if you want, but legalities have nothing to do with it.

He's settled things already.

commonism avatar Apr 08 '24 06:04 commonism

I thought this was MIT-0, but well, can you point me to somewhere to read up on this?

Here is the LICENSE file in your contribution repository.

birjj avatar Apr 08 '24 07:04 birjj

MIT-0 is "zero attribution", the license here is MIT. I was not aware MIT can be read as merge-without-attribution as well and was asking for an explanation of this.

commonism avatar Apr 08 '24 07:04 commonism

@commonism I've created a discussion in a throwaway repo to continue the license talk - there's no need to spam this PR with irrelevant discussion (open source etiquette and all :wink:)

birjj avatar Apr 08 '24 08:04 birjj