blob: 417d44424b44921b3443046ff0bb6b4ba891ea61 [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# 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.
---
- hosts: 127.0.0.1
connection: local
gather_facts: False
user: ubuntu
vars:
monitoringagents:
{% for agent in agents %}
- url: {{ agent.url }}
body: {{ agent.body }}
{% endfor %}
tasks:
# - name: debug
# debug: msg=" {{ '{{' }} item {{ '}}' }} "
# with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
- name: starting openstack service monitoring agent
uri:
url: "{{ '{{' }} item.url {{ '}}' }}"
method: POST
body: "{{ '{{' }} item.body {{ '}}' }}"
force_basic_auth: yes
status_code: 200
body_format: json
with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "