Skip to content
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

I5590 migrate ansible tower db #5606

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

I5590 migrate ansible tower db #5606

wants to merge 12 commits into from

Conversation

kayiwa
Copy link
Member

@kayiwa kayiwa commented Dec 6, 2024

Install and configure postgresql 13 on Rocky Linux

Related to #5590

@kayiwa kayiwa force-pushed the i5590_ansible_db branch 4 times, most recently from 365d6cf to 5dd1c54 Compare December 7, 2024 13:38
@kayiwa kayiwa requested a review from acozine December 7, 2024 14:07
@kayiwa kayiwa marked this pull request as ready for review December 7, 2024 14:07
@kayiwa kayiwa force-pushed the i5590_ansible_db branch 2 times, most recently from 5ebaa30 to f3979aa Compare December 11, 2024 17:00
Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hooray for getting postgresql 13 working on Rocky. I have a few ideas for making this easier for Future Us to manage and understand, see below.

playbooks/postgresql.yml Show resolved Hide resolved
roles/postgresql/defaults/main.yml Outdated Show resolved Hide resolved
roles/postgresql/tasks/create_db.yml Outdated Show resolved Hide resolved
roles/postgresql/tasks/main.yml Show resolved Hide resolved
roles/postgresql/tasks/main.yml Show resolved Hide resolved
roles/postgresql/tasks/pg_hba.yml Outdated Show resolved Hide resolved
roles/postgresql/templates/rh_postgresql.conf.j2 Outdated Show resolved Hide resolved
roles/postgresql/templates/rh_postgresql.conf.j2 Outdated Show resolved Hide resolved
roles/postgresql/templates/rh_postgresql.conf.j2 Outdated Show resolved Hide resolved
@acozine acozine changed the title I5590 ansible db I5590 migrate ansible tower db Dec 12, 2024
@kayiwa kayiwa requested a review from acozine December 31, 2024 13:09
Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big step forward, thanks! I saw a few things I wasn't sure about - see below.

roles/postgresql/tasks/main.yml Show resolved Hide resolved
roles/postgresql/tasks/main.yml Show resolved Hide resolved
roles/postgresql/defaults/main.yml Show resolved Hide resolved
roles/postgresql/tasks/main.yml Show resolved Hide resolved
roles/postgresql/tasks/main.yml Show resolved Hide resolved
notify: restart local postgres

- name: PostgreSQL | rotate the logs for postgresql
template:
ansible.builtin.template:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do both PostgreSQL installations write logs to the same place? Or do we need to make sure the logrotate template can handle two locations?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they do not (short answer)
Modify template for RHEL based machines (pair with @acozine)

roles/postgresql/tasks/main.yml Show resolved Hide resolved
roles/postgresql/tasks/main.yml Show resolved Hide resolved
when:
- postgresql_cluster != false
- inventory_hostname in postgresql_cluster.followers
- include_tasks: logical_replication.yml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put these back.

kayiwa and others added 12 commits January 14, 2025 04:11
installs postgresql-13 on Rocky Linux
add control loops for platforms
the values of Ubuntu and Redhat differ
Our datadog role does not (yet) work with RHEL
changing the name to ansible-db1 will need more changes to happen.
the ansible-db is restricted to ansible hosts and does not send logs to
datadog. Remove the task that adds hosts to pg_hba and modify the logs
to be readable only to the postgresql user
we use dnf to distinguish it from apt based installation

give the initialization task a clearer name
this can be future work to make RHEL based os'es to place their files
using the FHS that mirror's Debian (Ubuntu)

Co-authored-by: Alicia Cozine <[email protected]>
Co-authored-by: Angel Ruiz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants