Add dynamic group detection to openstack metrics
This change allows the larger os metrics installation process to be selective. A dynamic group will be created and hosts will be added to it when the host is within a known target group and is using systemd (required for now). Change-Id: I225ec5b5ffe4aa8ba403624f9ebe8c9eebed9fee Signed-off-by: cloudnull <kevin@cloudnull.com>
This commit is contained in:
parent
22f997f7fa
commit
faf940cbfc
@ -11,8 +11,28 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Detect monitorstack host deployment group(s)
|
||||||
|
hosts: "hosts:all_containers"
|
||||||
|
gather_facts: false
|
||||||
|
connection: local
|
||||||
|
tasks:
|
||||||
|
- name: Add hosts to dynamic inventory group
|
||||||
|
group_by:
|
||||||
|
key: monitorstack_deployment
|
||||||
|
parents: monitorstack_all
|
||||||
|
when:
|
||||||
|
- inventory_hostanme in (
|
||||||
|
(groups['nova_compute'] | default([])) |
|
||||||
|
union(groups['utility_all'] | default([])) |
|
||||||
|
union(groups['memcached_all'] | default([])) |
|
||||||
|
union(groups['memcached_all'] | default([]))
|
||||||
|
)
|
||||||
|
- ansible_service_mgr == 'systemd'
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
- name: Install MonitorStack
|
- name: Install MonitorStack
|
||||||
hosts: "nova_compute:utility_all:memcached_all"
|
hosts: monitorstack_all
|
||||||
become: true
|
become: true
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
vars:
|
vars:
|
||||||
|
Loading…
Reference in New Issue
Block a user