File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 22- name : Verify
33 hosts : all
44 become : false
5- gather_facts : false
5+ gather_facts : true
66
77 tasks :
88 - name : Test connection
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"
You can’t perform that action at this time.
0 commit comments