Skip to content
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
4 changes: 2 additions & 2 deletions README-ostree.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Usage:
.ostree/get_ostree_data.sh packages runtime DISTRO-VERSION FORMAT
```

`DISTRO-VERSION` is in the format that Ansible uses for `ansible_distribution`
and `ansible_distribution_version` - for example, `Fedora-38`, `CentOS-8`,
`DISTRO-VERSION` is in the format that Ansible uses for `ansible_facts["distribution"]`
and `ansible_facts["distribution_version"]` - for example, `Fedora-38`, `CentOS-8`,
`RedHat-9.4`

`FORMAT` is one of `toml`, `json`, `yaml`, `raw`
Expand Down
4 changes: 2 additions & 2 deletions templates/postgresql-internal.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{{ "system_role:postgresql" | comment(prefix="", postfix="") }}

{% if postgresql_server_tuning %}
shared_buffers = {{ (ansible_memory_mb.real.total / 4) | int | abs }}MB
effective_cache_size = {{ (ansible_memory_mb.real.total / 2) | int | abs }}MB
shared_buffers = {{ (ansible_facts.memory_mb.real.total / 4) | int | abs }}MB
effective_cache_size = {{ (ansible_facts.memory_mb.real.total / 2) | int | abs }}MB
{% endif %}
{% if postgresql_ssl_enable %}
ssl = on
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/install_and_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
- name: Test - server tuning is used - shared buffers
assert:
that: >
(ansible_memory_mb.real.total/4) | int | abs | string
(ansible_facts.memory_mb.real.total/4) | int | abs | string
in result.stdout
when:
- __test_check_unix_socket | d(true)
Expand All @@ -79,7 +79,7 @@
- name: Test - server tuning is used - effective cache size
assert:
that: >
(ansible_memory_mb.real.total/2) | int | abs | string
(ansible_facts.memory_mb.real.total/2) | int | abs | string
in result.stdout
when:
- __test_check_unix_socket | d(true)
Expand Down
3 changes: 2 additions & 1 deletion tests/tests_certificate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
- name: Check output of psql
assert:
that: >-
"SSL connection" in result.stdout
"SSL connection" in result.stdout or
"SSL Connection" in result.stdout
always:
- name: Stop tracking certificate
command: getcert stop-tracking -f /etc/pki/tls/certs/test_crt.crt
Expand Down
3 changes: 2 additions & 1 deletion tests/tests_custom_certificate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
- name: Check output of psql
assert:
that: >-
"SSL connection" in result.stdout
"SSL connection" in result.stdout or
"SSL Connection" in result.stdout
always:
- name: Clean up
include_tasks: tasks/clean_instance.yml
Expand Down
8 changes: 4 additions & 4 deletions tests/tests_include_vars_from_parent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
# create all variants like CentOS, CentOS_8.1, CentOS-8.1,
# CentOS-8, CentOS-8.1
# more formally:
# {{ ansible_distribution }}-{{ ansible_distribution_version }}
# {{ ansible_distribution }}-{{ ansible_distribution_major_version }}
# {{ ansible_distribution }}
# {{ ansible_os_family }}
# {{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}
# {{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}
# {{ ansible_facts['distribution'] }}
# {{ ansible_facts['os_family'] }}
# and the same for _ as separator.
varfiles: "{{ [facts['distribution']] | product(separators) |
map('join') | product(versions) | map('join') | list +
Expand Down
4 changes: 2 additions & 2 deletions tests/vars/rh_distros_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ __postgresql_rh_distros:
__postgresql_rh_distros_fedora: "{{ __postgresql_rh_distros + ['Fedora'] }}"

# Use this in conditionals to check if distro is Red Hat or clone
__postgresql_is_rh_distro: "{{ ansible_distribution in __postgresql_rh_distros }}"
__postgresql_is_rh_distro: "{{ ansible_facts['distribution'] in __postgresql_rh_distros }}"

# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__postgresql_is_rh_distro_fedora: "{{ ansible_distribution in __postgresql_rh_distros_fedora }}"
__postgresql_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __postgresql_rh_distros_fedora }}"
8 changes: 4 additions & 4 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ __postgresql_required_facts:
- distribution_major_version
- distribution_version
- os_family
- ansible_memory_mb
- memory_mb

# these facts cannot be used as a gather_subset
__postgresql_no_subset_facts: [ansible_memory_mb]
__postgresql_no_subset_facts: [memory_mb]

# the subsets of ansible_facts that need to be gathered in case any of the
# facts in required_facts is missing; see the documentation of
Expand All @@ -46,8 +46,8 @@ __postgresql_rh_distros:
__postgresql_rh_distros_fedora: "{{ __postgresql_rh_distros + ['Fedora'] }}"

# Use this in conditionals to check if distro is Red Hat or clone
__postgresql_is_rh_distro: "{{ ansible_distribution in __postgresql_rh_distros }}"
__postgresql_is_rh_distro: "{{ ansible_facts['distribution'] in __postgresql_rh_distros }}"

# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__postgresql_is_rh_distro_fedora: "{{ ansible_distribution in __postgresql_rh_distros_fedora }}"
__postgresql_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __postgresql_rh_distros_fedora }}"
# END - DO NOT EDIT THIS BLOCK - rh distros variables