Skip to content

Commit f8829aa

Browse files
Troubleshoot.
1 parent d8c1dca commit f8829aa

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,7 @@ jobs:
9494
PY_COLORS: 1
9595
ANSIBLE_FORCE_COLOR: 1
9696
ANSIBLE_ROLES_PATH: ~/.ansible/roles:${GITHUB_WORKSPACE}/ansible-role-bootstrap
97+
MOLECULE_DEBUG: 1
98+
ANSIBLE_VERBOSITY: 3
9799
image: ${{ matrix.distro.image }}
98100
tag: ${{ matrix.distro.tag }}

molecule/default/verify.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: Verify
33
hosts: all
44
become: false
5-
gather_facts: false
5+
gather_facts: true
66

77
tasks:
88
- name: Test connection
@@ -12,3 +12,44 @@
1212
ansible.builtin.package:
1313
name: gzip
1414
state: present
15+
16+
- name: Check if python is installed
17+
ansible.builtin.command:
18+
cmd: python3 --version
19+
changed_when: false
20+
register: python_version
21+
22+
- name: Show python version
23+
ansible.builtin.debug:
24+
var: python_version.stdout
25+
26+
# Add specific checks for Fedora to debug sudo issues
27+
- name: Check sudo configuration
28+
ansible.builtin.command:
29+
cmd: "{{ item }}"
30+
loop:
31+
- "id"
32+
- "whoami"
33+
- "sudo -V"
34+
register: sudo_check
35+
changed_when: false
36+
ignore_errors: true
37+
when: ansible_distribution == "Fedora"
38+
39+
- name: Show sudo configuration
40+
ansible.builtin.debug:
41+
var: sudo_check
42+
when: ansible_distribution == "Fedora"
43+
44+
- name: Check sudoers file
45+
ansible.builtin.command:
46+
cmd: "cat /etc/sudoers"
47+
register: sudoers_content
48+
changed_when: false
49+
ignore_errors: true
50+
when: ansible_distribution == "Fedora"
51+
52+
- name: Show sudoers content
53+
ansible.builtin.debug:
54+
var: sudoers_content
55+
when: ansible_distribution == "Fedora"

0 commit comments

Comments
 (0)