-
Notifications
You must be signed in to change notification settings - Fork 583
Rpm variable name change to 340 #352
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
Rpm variable name change to 340 #352
Conversation
… support different providers.
…dded default verbose.
…rvices during boot instead of having extra tasks. I removed them since they are not necessary.
* Increse the travis test coverage to include popular options * Fixed a missing quote... * Fixed syntax for options, and make postgis.yml RedHat compatible... ish * Looks like pgtune won't install either, as the epel repo isn't in the docker image. Taking it out too.. * Changing parameters to be in JSON format, for consumption on the command line * Adding a space to trigger a travis build * Remove the space, as travis didn't build anyway... :-/ * Debugging... why don't travis kick in... * Revert travis changes, to try and get it to trigger * Fixed typo in JSON parameters * Removed travis updates, and put parameters into postgresql.yml * Squashing all commits. Increases travis coverage, but not all are enabled yet. Other pull requests need to be merged first, as the tests for them fail.
…", which I suspect is a more reliable method.
…ople find it on Galaxy
…}" instead of "{{var}""
…NXS#267) * Extended and adapted to install PostgreSQL 10 for CentOS and Ubuntu Tested with ansible 2.4.1 for Ubuntu 16.04 and CentOS-7.4 - replaced deprecated 'include:' by 'include_tasks:' for ansible 2.4.1 - added config and config template for postgresql 10 - adapted defaults.yml - adapted templates/etc_systemd_system_postgresql.service.d_custom.conf.j2 for PostgreSQL 10 the template outputs the wrong line: ExecStartPre=/usr/pgsql-10/bin/postgresql10-check-db-dir the correct one must include an additional '-': ExecStartPre=/usr/pgsql-10/bin/postgresql-10-check-db-dir * Removed tabs from defaults/main.yml. * Adapted .travis.yml and yml files to run tests successfully for all given ansible versions. - added a test for ansible 2.4.2.0/posgresql 10. - replaced newer 'include_task' by 'include' again so that the role can be used with older ansible versions. NOTE: 'include' is deprecated and will be removed in ansible 2.8. - commeted out docker based tests because they do not run successfully and I do not know docker ;-) * Bug fix. Removed remains for my local teste in test/playbook.yml. * Bug fix and refinement for postgresql.conf-10.* . - added max_parallel_workers to postgresql.conf-10.j2 (forgotten/deleted in previous version) - hard coded value for wal_retrieve_retry_interval in postgresql.conf-10.j2 replaced by ansible variable Changes to be committed: modified: Vagrantfile modified: defaults/main.yml modified: templates/postgresql.conf-10.j2 modified: vagrant-inventory * Added suggestions from gclough. Changes to be committed: modified: Vagrantfile modified: defaults/main.yml modified: templates/HOWTO.postgresql.conf modified: templates/etc_systemd_system_postgresql.service.d_custom.conf.j2 modified: tests/playbook.yml modified: tests/vars.yml modified: vagrant-inventory * Replaced vagrant setup by project's master branch. * Updated tests/docker/group_vars/all.yml to include version 10. * Uncommented 'no_log: true' in users.yml. * Uncommented user baz in tests/docker/group_vars/postgresql.yml. * Recreated user baz but without passwd. We need him as database owner :-). * Added encrypted passwd for user baz. * Commented need for encrypted password if version >= 10. * Reenabled no_log: true for task PostgreSQL | Make sure the PostgreSQL users are present Fixed text in templates/HOWTO.posgresql.conf * Just to trigger a new build on github. Added blank in README.md. * Second try to trigger a rebuild. Blank in README.md deleted.
* Adding future scope for v10 (already out), and v11 (Sep/18) * Fixed "CentOS" spelling, and put a request for help
…e less transactions
ANXS#330) * Updated README to show v10 support, added top 10 contributors, and linked to defaults/main.yml * Fixed typo in contributors * Reload conf parameters after install, so that pg_hba.conf is re-read
Conflicts: handlers/main.yml tasks/extensions/postgis.yml tasks/install_yum.yml
Conflicts: tasks/extensions/dev_headers.yml
Conflicts: tasks/extensions/contrib.yml tasks/extensions/postgis.yml
7b246a4 to
19fa484
Compare
|
@jlozadad , I've made some variable name changes that I proposed in the comments of #340, but I've also done a little tidy up of the install section, making changes to the recent Fedora support you added. Can you see if this makes sense to you? |
41511b0 to
19e4924
Compare
5b58852 to
695bed0
Compare
…variable_name_change_to_340 Conflicts: defaults/main.yml handlers/main.yml tasks/extensions/contrib.yml tasks/extensions/postgis.yml tasks/install.yml tasks/install_yum.yml tasks/main.yml
tasks/main.yml
Outdated
| tags: [postgresql, postgresql-install] | ||
|
|
||
| - import_tasks: install_yum.yml | ||
| when: ansible_pkg_mgr == "yum" and ansible_distribution == "RedHat" |
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.
Please add change to when: ansible_pkg_mgr == "yum" and ansible_distribution == "RedHat" or ansible_distribution == "CentOS"
or just: when: ansible_pkg_mgr == "yum"
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.
@nissessenap, @gclough or change to ansible_os_family == 'RedHat'
nissessenap
left a comment
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.
The tasks/main.yml needs to be updated, this will fix the centos jobs.
|
@nissessenap , I never understood why the |
|
the reason |
| - name: PostgreSQL | Extensions | Make sure the postgis extensions are installed | RedHat | ||
| yum: | ||
| name: "{{ item }}" | ||
| name: "{{item}}" |
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.
why would you change it back this way? that is even worse.
| tags: [postgresql, postgresql-install] | ||
|
|
||
| - import_tasks: install_yum.yml | ||
| when: ansible_pkg_mgr == "yum" and ansible_distribution == "RedHat" |
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.
the reason this was changed this way is that if you use os_family* for fedora it would come back as a red hat OS and run install_yum.yml besides the obvious failure of postgres 9.3 for fedora, travis build all of this successfully and worked for the vagrant files. I added pkg_mgr and distribution so it picks it up the correct one. if you leave pkg_mgr == "yum" it will run on fedora too.
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.
OK, so I've put those back in, and included CentOS too as @nissessenap pointed out.
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.
@gclough maybe better something like !(I dont remember right syntax for logical not) ansible_distribution == "Fedora"?
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.
Or ansible_distribution != "Fedora"
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.
I guess we can either take either approach:
- We only support RedHat and CentOS... so let's list them explicitly
- We want to be generic, so let's use a negative test
The current code uses option 1, but I'm happy enough to swap if that's the consensus. Would someone else like to do that, so spread the credit for this work?
(also, I can't seem to squash my commits without screwing everything up. I don't know why there are 43 commits in there!)
|
This should fix the current broken-build problem, but it does more than just fix that. I don't think there's a mega-rush to fix the build, but if this could be reviewed and merged soon-ish, then that would put us in a good place IMHO. Thanks @nissessenap, @jlozadad , and @UnderGreen for your input and help thus far. If you're capable of squashing the commits and doing so under your account, that would be good so someone else get credit too, right? |
|
looks like everything passed now. |
A general tidy up of the install section, and some variable renames.