tasks: neutron_install: Fix group for neutron hosts

Previously, we only executed the AppArmor configuration when the
inventory_hostname matched one of the hosts in the neutron_appamor_hosts
list. However, there are cases were a multiple LXC hosts share the same
physical host. In that case, since we only record one container per
physical host, that container may not be part of the running inventory,
so the AppArmor configuration is never executed. We fix that by simply
iterating the neutron_all group which should contain all the hosts which
participate in the neutron deployment.

Change-Id: Ib523de857a5de9adc86bd90fe6919af17704192f
This commit is contained in:
Markos Chandras 2018-10-18 16:57:25 +01:00
parent 161fb3cd84
commit 5078d478fb
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@
neutron_apparmor_hosts: |
{%- set apparmor_hosts = [] -%}
{%- set physical_hosts = [] -%}
{%- for host in groups['all'] -%}
{%- for host in groups[neutron_role_project_group] -%}
{%- if hostvars[host]['physical_host'] is defined -%}
{%- set phost = hostvars[host]['physical_host'] -%}
{%- if phost not in physical_hosts -%}