blob: 417d44424b44921b3443046ff0bb6b4ba891ea61 [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
rdudyala996d70b2016-10-13 17:40:55 +000017---
18- hosts: 127.0.0.1
19 connection: local
20 gather_facts: False
21 user: ubuntu
22 vars:
23 monitoringagents:
24 {% for agent in agents %}
25 - url: {{ agent.url }}
26 body: {{ agent.body }}
27 {% endfor %}
28
29 tasks:
Srikanth Vavilapalli3a289602016-12-16 01:44:43 +000030# - name: debug
31# debug: msg=" {{ '{{' }} item {{ '}}' }} "
32# with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
rdudyala996d70b2016-10-13 17:40:55 +000033
34 - name: starting openstack service monitoring agent
35 uri:
36 url: "{{ '{{' }} item.url {{ '}}' }}"
37 method: POST
38 body: "{{ '{{' }} item.body {{ '}}' }}"
39 force_basic_auth: yes
40 status_code: 200
41 body_format: json
42 with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
43