Skip to content

Commit

Permalink
Update converge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Dec 9, 2024
1 parent c93e0fc commit e4db810
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions automation/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,19 @@
append: true
when: ansible_os_family == "RedHat"

- name: Ensure PAM module pam_unix is present
- name: Ensure authselect is installed
become: true
become_method: su
ansible.builtin.command: "authselect apply-changes"
ignore_errors: yes
ansible.builtin.package:
name: authselect
state: present
when: ansible_os_family == "RedHat"

- name: Apply authselect changes if available
become: true
become_method: su
ansible.builtin.command: authselect apply-changes
ignore_errors: true
when: ansible_os_family == "RedHat"

- name: Check and fix PAM configuration for sudo
Expand All @@ -52,19 +60,25 @@
- name: Test sudo without password
ansible.builtin.command: sudo -n true
register: sudo_test
ignore_errors: yes
ignore_errors: true
when: ansible_os_family == "RedHat"

- name: Debug sudo test result
ansible.builtin.debug:
var: sudo_test
when: ansible_os_family == "RedHat"

- name: Ensure SELinux is permissive (temporary workaround)
- name: Check if SELinux is installed
become: true
ansible.builtin.command: which setenforce
register: selinux_check
ignore_errors: true
when: ansible_os_family == "RedHat"

- name: Ensure SELinux is permissive (if installed)
become: true
become_method: su
ansible.builtin.command: setenforce 0
ignore_errors: yes
ignore_errors: true
when: ansible_os_family == "RedHat"

- name: Set variables for PostgreSQL Cluster deployment test
Expand Down

0 comments on commit e4db810

Please sign in to comment.