File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
#!usr/bin/env python3
2
2
3
3
from ansible .errors import AnsibleFilterError
4
- # from ansible.plugins.filter.core imprt FilterModule
5
4
6
5
class FilterModule (object ):
7
6
def filters (self ):
Original file line number Diff line number Diff line change 1
1
---
2
+ - name : Get facts for control host
3
+ hosts : localhost
4
+ gather_facts : true
5
+ tasks :
6
+ - name : Check if kolla_neutron_ml2_mechanism_drivers is defined
7
+ ansible.builtin.set_fact :
8
+ kolla_neutron_ml2_mechanism_drivers_defined : " {{ kolla_neutron_ml2_mechanism_drivers is defined }}"
9
+ - name : Check if ngs enabled
10
+ ansible.builtin.set_fact :
11
+ ngs_enabled : >-
12
+ {{ 'genericswitch' in kolla_neutron_ml2_mechanism_drivers }}
13
+ when : kolla_neutron_ml2_mechanism_drivers_defined
2
14
- name : Can the control host reach the internet?
3
15
hosts : localhost
4
16
gather_facts : true
79
91
wazuh_enabled : " {{ groups['wazuh-agent'] | length > 0 | bool }}"
80
92
# ngs_enabled_: "{{ 'genericswitch' in (kolla_neutron_ml2_mechanism_drivers | default([])) | bool }}"
81
93
# # ABOVE LEADS TO ERROR: argument of type ''NoneType'' is not iterable. argument of type ''NoneType'' is not iterable'
94
+ ngs_enabled : " {{ ngs_enabled | default(false) }}"
82
95
kayobe_managed_switches : " {{ groups['switches'] | length > 0 | bool }}"
83
96
proxy_configured : " {{ http_proxy | bool or https_proxy | bool }}"
84
97
bifrost_version : " {{ kolla_bifrost_source_version }}"
You can’t perform that action at this time.
0 commit comments