Skip to content

Commit

Permalink
Upgrade: Add PATH for patronictl; Override become_method in Molecule …
Browse files Browse the repository at this point in the history
…tests (#832)
  • Loading branch information
vitabaks authored Dec 11, 2024
1 parent 03157f7 commit 2fe25cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions automation/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
tasks:
- name: Set variables for PostgreSQL Cluster deployment test
ansible.builtin.set_fact:
ansible_become_method: su # Override become_method
firewall_enabled_at_boot: false
firewall_enable_ipv6: false # Added to prevent test failures in CI.
swap_file_create: false # Added to prevent test failures in CI.
Expand Down
1 change: 0 additions & 1 deletion automation/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
- name: "Install netaddr dependency on controlling host"
ansible.builtin.pip:
name: netaddr
become: false
environment:
PIP_BREAK_SYSTEM_PACKAGES: "1"

Expand Down
1 change: 1 addition & 0 deletions automation/molecule/pg_upgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
tasks:
- name: Set variables for Patroni cluster deployment test
ansible.builtin.set_fact:
ansible_become_method: su # Override become_method
firewall_enabled_at_boot: false
firewall_enable_ipv6: false # Added to prevent test failures in CI.
swap_file_create: false # Added to prevent test failures in CI.
Expand Down
1 change: 1 addition & 0 deletions automation/molecule/postgrespro/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
tasks:
- name: Set variables for molecule
ansible.builtin.set_fact:
ansible_become_method: su # Override become_method
firewall_enable_ipv6: false # Added to prevent test failures in CI.
swap_file_create: false # Added to prevent test failures in CI.
sysctl_set: false # Added to prevent test failures in CI.
Expand Down
2 changes: 2 additions & 0 deletions automation/roles/upgrade/tasks/update_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@

- name: "Remove 'standby_cluster' parameter from DCS (if exists)"
ansible.builtin.command: patronictl -c {{ patroni_config_file }} edit-config -s standby_cluster=null --force
environment:
PATH: "{{ ansible_env.PATH }}:/usr/bin:/usr/local/bin"
when: inventory_hostname in groups['primary']

# Copy the pg_hba.conf file to a new PostgreSQL to save pg_hba rules.
Expand Down

0 comments on commit 2fe25cd

Please sign in to comment.