Use ansible_facts[] rather than ansible_ variables

Change-Id: Idd4bd35e1bbeb30b9dfa8c9b7a39acfd14bfd6ac
This commit is contained in:
Jonathan Rosser 2022-10-05 18:12:50 +01:00
parent f2df86fb26
commit d42c065003
3 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@
{%- endif -%}
{%- endfor -%}
{{ apparmor_hosts | unique }}
when: ansible_pkg_mgr == 'apt'
when: ansible_facts['pkg_mgr'] == 'apt'
- import_tasks: neutron_apparmor.yml
when:

View File

@ -26,7 +26,7 @@ neutron_package_list: |-
{% set packages = neutron_distro_packages %}
{% if neutron_needs_openvswitch | bool %}
{% set _ = packages.extend(neutron_optional_ovs_distro_packages) %}
{% if (ovs_dpdk_support and ansible_pkg_mgr == 'apt') %}
{% if (ovs_dpdk_support and ansiblei_facts['pkg_mgr'] == 'apt') %}
{% set _ = packages.extend(neutron_ovs_dpdk_required_packages) %}
{% else %}
{% set _ = packages.extend(neutron_ovs_distro_packages) %}

View File

@ -25,7 +25,7 @@
neutron_package_list: |-
{% set packages = neutron_distro_packages %}
{% if neutron_needs_openvswitch | bool %}
{% if (ovs_dpdk_support and ansible_pkg_mgr == 'apt') %}
{% if (ovs_dpdk_support and ansible_facts['pkg_mgr'] == 'apt') %}
{% set _ = packages.extend(neutron_ovs_dpdk_required_packages) %}
{% else %}
{% set _ = packages.extend(neutron_ovs_distro_packages) %}