From 95893e43d63dd2287212a999fa93e096ee951658 Mon Sep 17 00:00:00 2001 From: Fredrik Hindersson Date: Thu, 27 Aug 2026 13:15:17 +0200 Subject: [PATCH] Fix apparmor profile for LXC on Ubuntu 24.04 --- inventory/group_vars/all_containers.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inventory/group_vars/all_containers.yml b/inventory/group_vars/all_containers.yml index c219427bd7..6d4d7eecca 100644 --- a/inventory/group_vars/all_containers.yml +++ b/inventory/group_vars/all_containers.yml @@ -16,7 +16,10 @@ # This is the default LXC AppArmor profile # Groups which need the unbound profile have a specific override lxc_container_config_list: - - "lxc.apparmor.profile={{ (hostvars[physical_host]['ansible_facts']['distribution'] == 'Debian' ) | ternary('unconfined', 'lxc-openstack') }}" + #- "lxc.apparmor.profile={{ (hostvars[physical_host]['ansible_facts']['distribution'] == 'Debian' ) | ternary('unconfined', 'lxc-openstack') }}" + - "lxc.apparmor.profile={{ 'unconfined' if hostvars[physical_host]['ansible_facts']['distribution'] == 'Debian' else ('generated' if hostvars[physical_host]['ansible_facts']['distribution_version'] is version('24.04', '>=') else 'lxc-openstack') }}" + - "lxc.apparmor.allow_nesting=1" + # Needed by playbooks/common-tasks/os-lxc-container-setup.yml lxc_container_log_path: "/var/log/lxc"