From a6c6bd1e0c8e5fae1a83ab50d838f9fd0e4d4b80 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Fri, 30 Sep 2016 10:55:59 -0400 Subject: [PATCH] Fix path for /lib/modules on CentOS On CentOS /lib is a symlink to /usr/lib, therefore it needs to be changed to point to the real path. If not the container refuse to start. Change-Id: I790dfbd4b995adf250873bcde1785235adea0931 --- playbooks/os-neutron-install.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/playbooks/os-neutron-install.yml b/playbooks/os-neutron-install.yml index 6599df40c2..1f01782af9 100644 --- a/playbooks/os-neutron-install.yml +++ b/playbooks/os-neutron-install.yml @@ -23,7 +23,7 @@ vars: sort_group_name: "neutron_all" - include: common-tasks/os-lxc-container-setup.yml - static: no + # This config is specific to Ubuntu vars: aa_profile: "unconfined" list_of_bind_mounts: @@ -31,7 +31,21 @@ mount_path: "/lib/modules" extra_container_config: - "lxc.cgroup.devices.allow=a *:* rmw" - when: inventory_hostname in groups['neutron_agent'] + when: + - inventory_hostname in groups['neutron_agent'] + - ansible_pkg_mgr == 'apt' + - include: common-tasks/os-lxc-container-setup.yml + # This config is specific to CentOS. + vars: + aa_profile: "unconfined" + list_of_bind_mounts: + - bind_dir_path: "/usr/lib/modules" + mount_path: "/usr/lib/modules" + extra_container_config: + - "lxc.cgroup.devices.allow=a *:* rmw" + when: + - inventory_hostname in groups['neutron_agent'] + - ansible_pkg_mgr == 'yum' - include: common-tasks/os-lxc-container-setup.yml static: no when: inventory_hostname not in groups['neutron_agent']