| 1 |
# Workaround for Alma 9 container running on Ubuntu 24.04 host. |
| 2 |
# All password authentications fail in a container if the container image has |
| 3 |
# mode 000 on /etc/shdow and the container is runing on a host with a |
| 4 |
# particular AppArmor profile. |
| 5 |
# See |
| 6 |
# - https://github.com/geerlingguy/docker-rockylinux9-ansible/issues/6 |
| 7 |
# - https://github.com/moby/moby/issues/48734 |
| 8 |
# - https://www.tunbury.org/2025/05/13/ubuntu-apparmor/ |
| 9 |
- name: Set permissions |
| 10 |
file: |
| 11 |
path: /etc/shadow |
| 12 |
mode: u=rw,go= |
| 13 |
when: |
| 14 |
- (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '9') |