blob: de036467671756ccbc44e35ca8800d1ed0edb0ff [file] [log] [blame]
rdudyala996d70b2016-10-13 17:40:55 +00001---
2- hosts: 127.0.0.1
3 connection: local
4 gather_facts: False
5 user: ubuntu
6 vars:
7 monitoringagents:
8 {% for agent in agents %}
9 - url: {{ agent.url }}
10 body: {{ agent.body }}
11 {% endfor %}
12
13 tasks:
14 - name: debug
15 debug: msg=" {{ '{{' }} item {{ '}}' }} "
16 with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
17
18 - name: starting openstack service monitoring agent
19 uri:
20 url: "{{ '{{' }} item.url {{ '}}' }}"
21 method: POST
22 body: "{{ '{{' }} item.body {{ '}}' }}"
23 force_basic_auth: yes
24 status_code: 200
25 body_format: json
26 with_items: " {{ '{{' }} monitoringagents {{ '}}' }} "
27