Remove dynamic-grouping common task file

This is only used once so is not necessary to be in common_tasks

Change-Id: I55ebc64c49c0dc122304edbf195468cf1652a4e8
This commit is contained in:
Jonathan Rosser 2024-07-03 08:54:20 +01:00
parent 4c40bcb9d6
commit eccd6c50e4
2 changed files with 7 additions and 26 deletions

View File

@ -1,24 +0,0 @@
---
# Copyright 2016, Logan Vig <logan2211@gmail.com>
#
# 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

View File

@ -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"