Skip to content

Commit 9c7b5b0

Browse files
committed
Place unix-chkpwd AppArmor profile into complain mode
This is necessary when running Molecule tests against Fedora 40 and 41; otherwise, the privileged container cannot successfully sudo and hence Ansible is unable to do anything. Note that for security reasons this change is reverted after the Molecule tests are run.
1 parent e940403 commit 9c7b5b0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,23 @@ jobs:
238238
uses: docker/setup-qemu-action@v3
239239
- name: Set up Docker Buildx
240240
uses: docker/setup-buildx-action@v3
241+
# This is necessary when running Molecule tests against Fedora
242+
# 40 and 41; otherwise, the privileged container cannot
243+
# successfully sudo and hence Ansible is unable to do anything.
244+
- name: Place unix-chkpwd AppArmor profile into complain mode
245+
run: |
246+
sudo apt-get update
247+
sudo apt-get upgrade
248+
sudo apt-get install apparmor-utils
249+
sudo aa-complain /usr/sbin/unix_chkpwd
241250
- name: Run molecule tests
242251
run: >-
243252
molecule test
244253
--platform-name ${{ matrix.platform }}-${{ matrix.architecture }}
245254
--scenario-name ${{ matrix.scenario }}
255+
- name: Place unix-chkpwd AppArmor profile into enforce mode
256+
run: >-
257+
sudo aa-enforce /usr/sbin/unix_chkpwd
246258
- name: Setup tmate debug session
247259
uses: mxschmitt/action-tmate@v3
248260
if: env.RUN_TMATE

0 commit comments

Comments
 (0)