Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: Fix podman socket SELinux context on AWS #631

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ansible/roles/tasks-systemd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
dest: /tmp/cockpituous.fc
mode: 0644
content: |
/var/run/podman/podman.sock system_u:object_r:container_file_t:s0
/run/podman/podman.sock system_u:object_r:container_file_t:s0
register: selinux_policy_fc

- name: Create custom SELinux policy type enforcements
Expand Down Expand Up @@ -43,7 +43,8 @@
shell: |
checkmodule -M -m -o /tmp/cockpituous.mod /tmp/cockpituous.te
semodule_package -o /tmp/cockpituous.pp -m /tmp/cockpituous.mod -f /tmp/cockpituous.fc
semodule -i /tmp/cockpituous.pp
# needs to be higher than extra_varrun
semodule -v --priority=500 -i /tmp/cockpituous.pp
when: selinux_policy_fc.changed or selinux_policy_te.changed

# This only applies to RH VPN; make that optional if we ever deploy to public infrastructure
Expand Down