Skip to content

Commit 5f5680a

Browse files
author
Ubuntu
committed
Edits from review
1 parent 1c70988 commit 5f5680a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

etc/kayobe/ansible/filter_plugins/filters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!usr/bin/env python3
22

33
from ansible.errors import AnsibleFilterError
4-
# from ansible.plugins.filter.core imprt FilterModule
54

65
class FilterModule(object):
76
def filters(self):

etc/kayobe/ansible/get-cloud-facts.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
---
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
214
- name: Can the control host reach the internet?
315
hosts: localhost
416
gather_facts: true
@@ -79,6 +91,7 @@
7991
wazuh_enabled: "{{ groups['wazuh-agent'] | length > 0 | bool }}"
8092
# ngs_enabled_: "{{ 'genericswitch' in (kolla_neutron_ml2_mechanism_drivers | default([])) | bool }}"
8193
# # 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) }}"
8295
kayobe_managed_switches: "{{ groups['switches'] | length > 0 | bool }}"
8396
proxy_configured: "{{ http_proxy | bool or https_proxy | bool }}"
8497
bifrost_version: "{{ kolla_bifrost_source_version }}"

0 commit comments

Comments
 (0)