From eccd6c50e43876c13b0a26afed171697f6a5bb62 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 3 Jul 2024 08:54:20 +0100 Subject: [PATCH] Remove dynamic-grouping common task file This is only used once so is not necessary to be in common_tasks Change-Id: I55ebc64c49c0dc122304edbf195468cf1652a4e8 --- playbooks/common-tasks/dynamic-grouping.yml | 24 --------------------- playbooks/os-neutron-install.yml | 9 ++++++-- 2 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 playbooks/common-tasks/dynamic-grouping.yml diff --git a/playbooks/common-tasks/dynamic-grouping.yml b/playbooks/common-tasks/dynamic-grouping.yml deleted file mode 100644 index 8580ca8119..0000000000 --- a/playbooks/common-tasks/dynamic-grouping.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Copyright 2016, Logan Vig -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- name: Add hosts to dynamic inventory group - add_host: - group: "{{ dest_group }}" - name: "{{ item }}" - with_items: "{{ groups[src_group] }}" - when: - - "group_when | default(True)" - tags: - - common-grouping diff --git a/playbooks/os-neutron-install.yml b/playbooks/os-neutron-install.yml index d2d5568f8f..3b18cc886a 100644 --- a/playbooks/os-neutron-install.yml +++ b/playbooks/os-neutron-install.yml @@ -36,8 +36,13 @@ hosts: localhost gather_facts: no tasks: - - name: Importing dynamic-grouping tasks - import_tasks: common-tasks/dynamic-grouping.yml + - name: Add hosts to dynamic inventory group + add_host: + group: "{{ dest_group }}" + name: "{{ item }}" + with_items: "{{ groups[src_group] }}" + when: + - "group_when | default(True)" vars: src_group: "nova_compute" dest_group: "neutron_l3_agent, neutron_metadata_agent"