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

Fix linting issues due to long lines and improper spacing #627

Merged
merged 2 commits into from
Apr 12, 2024
Merged
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
2 changes: 1 addition & 1 deletion roles/setup_pgbackrest/tasks/configure_pgbackrest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

- name: Build configuration file {{ pgbackrest_configuration_file }}
ansible.builtin.template:
src: "./templates/pgbackrest_{{ group_names |select('match', 'primary|slave') |first }}.{{ pgbackrest_archive_method }}.conf.template"
src: "./templates/pgbackrest_{{ group_names | select('match', 'primary|slave') | first }}.{{ pgbackrest_archive_method }}.conf.template"
dest: "{{ pgbackrest_configuration_file }}"
owner: "{{ pg_owner }}"
group: "{{ pg_group }}"
Expand Down
11 changes: 7 additions & 4 deletions roles/tuning/tasks/tune_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- name: Override the variable _pg_max_connections
ansible.builtin.set_fact:
_pg_max_connections: >-
{{ pg_postgres_conf_params |selectattr('name', 'equalto', 'max_connections') |map(attribute='value') |default([_pg_max_connections], true) |first }}
{{ pg_postgres_conf_params | selectattr('name', 'equalto', 'max_connections') | map(attribute='value') | default([_pg_max_connections], true) | first }}
when: pg_conf_override_tuning

# Set the shared_buffers value
Expand All @@ -86,7 +86,8 @@
- name: Override the variable _pg_shared_buffers_mb
ansible.builtin.set_fact:
_pg_shared_buffers_mb: >-
{{ pg_postgres_conf_params |selectattr('name', 'equalto', 'shared_buffers') |map(attribute='value') |default([_pg_shared_buffers_mb], true) |first |ansible.builtin.regex_replace('mb', '', ignorecase=True) }}
{{ pg_postgres_conf_params | selectattr('name', 'equalto', 'shared_buffers') | map(attribute='value')
| default([_pg_shared_buffers_mb], true) | first | ansible.builtin.regex_replace('mb', '', ignorecase=True) }}
when: pg_conf_override_tuning

# Set the work_mem value to: ((Total RAM - shared_buffers)/(16 x CPU cores))
Expand All @@ -99,7 +100,8 @@
- name: Override the variable _pg_work_mem_mb
ansible.builtin.set_fact:
_pg_work_mem_mb: >-
{{ pg_postgres_conf_params |selectattr('name', 'equalto', 'work_mem') |map(attribute='value') |default([_pg_work_mem_mb], true) |first |ansible.builtin.regex_replace('mb', '', ignorecase=True) }}
{{ pg_postgres_conf_params | selectattr('name', 'equalto', 'work_mem') | map(attribute='value')
| default([_pg_work_mem_mb], true) | first | ansible.builtin.regex_replace('mb', '', ignorecase=True) }}
when: pg_conf_override_tuning

# Set the maintenance_work_mem value to:
Expand All @@ -121,7 +123,8 @@
- name: Override the variable _pg_maintenance_work_mem_mb
ansible.builtin.set_fact:
_pg_maintenance_work_mem_mb: >-
{{ pg_postgres_conf_params |selectattr('name', 'equalto', 'maintenance_work_mem') |map(attribute='value') |default([_pg_maintenance_work_mem_mb], true) |first |ansible.builtin.regex_replace('mb', '', ignorecase=True) }}
{{ pg_postgres_conf_params | selectattr('name', 'equalto', 'maintenance_work_mem') | map(attribute='value')
| default([_pg_maintenance_work_mem_mb], true) | first | ansible.builtin.regex_replace('mb', '', ignorecase=True) }}
when: pg_conf_override_tuning

- name: Initialize the Postgres parameters list
Expand Down
Loading