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

Upgrade: Add PATH for patronictl; Override become_method in Molecule tests #832

Merged
merged 51 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
284df6a
Upgrade: Add PATH environment for patronictl command
vitabaks Dec 7, 2024
b1b8a0a
become: true
vitabaks Dec 7, 2024
fa40550
Update converge.yml
vitabaks Dec 7, 2024
fe2cfc9
Update converge.yml
vitabaks Dec 7, 2024
0c1b3f2
Ensure sudo is installed
vitabaks Dec 7, 2024
da60292
Update converge.yml
vitabaks Dec 7, 2024
41173a8
Ensure PAM is installed and debug
vitabaks Dec 7, 2024
35571d5
Update converge.yml
vitabaks Dec 7, 2024
650826f
Update converge.yml
vitabaks Dec 7, 2024
f81ee19
become_method: su
vitabaks Dec 7, 2024
cd49307
Ensure sudo NOPASSWD is configured for ansible user
vitabaks Dec 7, 2024
970a96f
Update converge.yml
vitabaks Dec 7, 2024
c92c2a0
Update converge.yml
vitabaks Dec 8, 2024
f67df42
Update converge.yml
vitabaks Dec 8, 2024
ab6c153
Update converge.yml
vitabaks Dec 8, 2024
8a78ade
Update converge.yml
vitabaks Dec 8, 2024
f950d4a
become_method: su
vitabaks Dec 8, 2024
46a9787
Update converge.yml
vitabaks Dec 8, 2024
15e6c87
debug
vitabaks Dec 8, 2024
87dece7
debug pam
vitabaks Dec 8, 2024
205187f
pamtester
vitabaks Dec 8, 2024
9dc79f4
Disable PAM for sudo
vitabaks Dec 8, 2024
9caf7b8
Debug PAM configuration for sudo
vitabaks Dec 8, 2024
34f7c96
Update converge.yml
vitabaks Dec 8, 2024
c54c12f
ebug system-auth configuration
vitabaks Dec 8, 2024
4e0cb4c
Disable PAM for sudo
vitabaks Dec 8, 2024
bda7159
Update converge.yml
vitabaks Dec 8, 2024
3d89a78
Disable PAM authentication in sudoers
vitabaks Dec 8, 2024
c125783
Update converge.yml
vitabaks Dec 8, 2024
0ba8a1c
debug
vitabaks Dec 8, 2024
b5805bc
Update converge.yml
vitabaks Dec 8, 2024
b748744
Update converge.yml
vitabaks Dec 8, 2024
c80d1ea
Update converge.yml
vitabaks Dec 8, 2024
1b6f950
Update converge.yml
vitabaks Dec 8, 2024
e43df8b
ansible_facts.user
vitabaks Dec 8, 2024
f937fe4
Update converge.yml
vitabaks Dec 8, 2024
c93e0fc
Update converge.yml
vitabaks Dec 9, 2024
e4db810
Update converge.yml
vitabaks Dec 9, 2024
5d56206
Use SSH key to molecule tests
vitabaks Dec 10, 2024
6b065a3
Get system username
vitabaks Dec 10, 2024
1fd458b
Switch to SSH key-based authentication
vitabaks Dec 10, 2024
1746f5f
Ensure SSH directory exists on molecule instances
vitabaks Dec 10, 2024
8f37430
Update converge.yml
vitabaks Dec 10, 2024
f460931
Update apt cache
vitabaks Dec 10, 2024
6042704
Update converge.yml
vitabaks Dec 10, 2024
1dbbe34
Update converge.yml
vitabaks Dec 10, 2024
78351bc
Update config.yml
vitabaks Dec 10, 2024
84184a5
Add "Prepare" play
vitabaks Dec 10, 2024
31c2b77
Reset SSH connection to apply new credentials
vitabaks Dec 10, 2024
d2c927c
update molecule config
vitabaks Dec 10, 2024
7143396
Override become_method
vitabaks Dec 10, 2024
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 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
Loading