Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks authored Dec 16, 2024
1 parent 6ed248f commit 8ac1c91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions automation/roles/patroni/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,11 @@
- name: Generating TLS Certificates to {{ postgresql_home_dir }}/{{ postgresql_version }}
become: true
become_user: postgres
shell:
ansible.builtin.command:
cmd: openssl req -nodes -new -x509 -days 3650 -keyout server.key -out server.crt -subj '/C=AL/L=City/O=Org/CN=PostgreSQL'
chdir: "{{ postgresql_home_dir }}/{{ postgresql_version }}/"

- name: Changing permissions for {{ postgresql_home_dir }}/{{ postgresql_version }}/server.key
file:
ansible.builtin.file:
path: "{{ postgresql_home_dir }}/{{ postgresql_version }}/server.key"
state: file
owner: postgres
Expand Down
6 changes: 3 additions & 3 deletions automation/roles/pgbouncer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@
- name: Generating TLS Certificates to {{ pgbouncer_conf_dir }}
become: true
become_user: postgres
shell:
ansible.builtin.command:
cmd: openssl req -nodes -new -x509 -days 3650 -keyout server.key -out server.crt -subj '/C=AL/L=City/O=Org/CN=PostgreSQL'
chdir: "{{ pgbouncer_conf_dir }}/"

- name: Changing permissions for {{ pgbouncer_conf_dir }}/server.key
file:
ansible.builtin.file:
path: "{{ pgbouncer_conf_dir }}/server.key"
state: file
owner: postgres
group: postgres
mode: 0400
mode: "0400"

- name: Configure pgbouncer.ini
ansible.builtin.template:
Expand Down

0 comments on commit 8ac1c91

Please sign in to comment.