rdudyala | 996d70b | 2016-10-13 17:40:55 +0000 | [diff] [blame] | 1 | --- |
| 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: |
Srikanth Vavilapalli | 3a28960 | 2016-12-16 01:44:43 +0000 | [diff] [blame^] | 14 | # - name: debug |
| 15 | # debug: msg=" {{ '{{' }} item {{ '}}' }} " |
| 16 | # with_items: " {{ '{{' }} monitoringagents {{ '}}' }} " |
rdudyala | 996d70b | 2016-10-13 17:40:55 +0000 | [diff] [blame] | 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 | |