From eca8f096289c2595623e25c0d77d1559f01c5ca9 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 10 Apr 2020 15:56:20 +0300 Subject: [PATCH] Set apparmor statement based on LXC version used We rely on mapping inside lxc-containers-create role while we have a variable defined with correct version of lxc. So we can set key correctly here. Change-Id: Ic9c6287e43737fb2dc6f833dd6e2adff02066f10 --- test-vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-vars.yml b/test-vars.yml index 31a75566..7bd08cbe 100644 --- a/test-vars.yml +++ b/test-vars.yml @@ -70,7 +70,7 @@ lxc_kernel_options: - { key: 'fs.inotify.max_user_instances', value: 1024 } lxc_config_key_apparmor: "{{ lookup('pipe', 'lxc-info --version || echo 2.0.0') is version('3.0.0', 'lt') | ternary('aa_profile', 'apparmor.profile') }}" lxc_container_config_list: - - "{{ (hostvars[physical_host]['ansible_distribution'] == 'Debian' and hostvars[physical_host]['ansible_distribution_major_version'] == '10' ) | ternary('lxc.aa_profile=unconfined', 'lxc.aa_profile=lxc-openstack') }}" + - "{{ (hostvars[physical_host]['ansible_distribution'] == 'Debian') | ternary('lxc.' ~ lxc_config_key_apparmor~'=unconfined', 'lxc.' ~ lxc_config_key_apparmor ~ '=lxc-openstack') }}" # Galera Settings galera_address: "{{ test_galera_host }}"