Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions development/playbooks/remote-database/remote-database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- "../../../src/vars/defaults.yml"
- "../../../src/vars/flavors/{{ flavor }}.yml"
- "../../../src/vars/database.yml"
- "../../../src/vars/images.yml"
vars:
certificates_hostnames:
- "{{ ansible_facts['fqdn'] }}"
Expand Down
12 changes: 0 additions & 12 deletions src/roles/postgresql/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@
name: "{{ postgresql_container_name }}"
state: started

# SCRAM-SHA-256 is default for PostgreSQL 14+,
# after the upgrade, we can drop this task.
- name: Use scram-sha-256 for password encryption
community.postgresql.postgresql_set:
login_user: postgres
login_password: "{{ postgresql_admin_password }}"
login_host: localhost
name: password_encryption
value: "scram-sha-256"
notify:
- Restart postgresql

- name: Create PostgreSQL users
community.postgresql.postgresql_user:
name: "{{ item.name }}"
Expand Down
11 changes: 11 additions & 0 deletions src/roles/pre_install/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
ansible.builtin.include_role:
name: debug_tools

- name: 'Enable postgresql:16 module'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@evgeni, let me ask this question again: wouldn't it be more resilient to run the PG commands from inside a PG container instead of installing the client tooling directly on the host?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would, sure. I just had none that I could integrate easily into the various workflows where we need Postgres tooling on the host.

ansible.builtin.command: dnf module enable -y postgresql:16
# can't use the `dnf` module for modules without a default stream
# https://github.com/ansible/ansible/issues/56504
# https://github.com/ansible/ansible/issues/64852
args:
creates: /etc/dnf/modules.d/postgresql.module
when:
- ansible_facts['os_family'] == 'RedHat'
- ansible_facts['distribution_major_version'] == '9'

- name: Install podman and utilities
ansible.builtin.package:
name:
Expand Down
2 changes: 1 addition & 1 deletion src/vars/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ foreman_container_tag: "{{ container_tag_stream }}"
foreman_proxy_container_image: "quay.io/foreman/foreman-proxy"
foreman_proxy_container_tag: "{{ container_tag_stream }}"

postgresql_container_image: quay.io/sclorg/postgresql-13-c9s
postgresql_container_image: quay.io/sclorg/postgresql-16-c10s
postgresql_container_tag: "latest"
pulp_container_image: quay.io/foreman/pulp
pulp_container_tag: "foreman-{{ container_tag_stream }}"
Expand Down
Loading