blob: 704cadf7bf6335f909e75eeaae94478b2b33d821 [file] [log] [blame]
Srikanth Vavilapalli0ddb11f2016-01-29 14:29:26 -05001---
2- hosts: {{ instance_name }}
3 gather_facts: False
4 connection: ssh
5 user: {{ username }}
6 sudo: yes
7
8 tasks:
9
10 - name: Get Docker IP
11 #TODO: copy dockerip.sh to monitoring service synchronizer
12 script: /opt/xos/synchronizers/onos/scripts/dockerip.sh {{ sflow_container }}
13 register: sflowserviceaddr
14
15 - name: Wait for SFlow service to come up
16 wait_for:
17 host={{ '{{' }} sflowserviceaddr.stdout {{ '}}' }}
18 port={{ '{{' }} item {{ '}}' }}
19 state=present
20 with_items:
21 - {{ sflow_api_port }}
22
23 - name: Invoke SFlow service REST API to subscribe
24 uri:
25 url: http://{{ '{{' }} sflowserviceaddr.stdout {{ '}}' }}:{{ sflow_api_port }}/subscribe
26 body: "{{ listening_endpoint }}"
Zack Williamsc5fdc882016-05-13 15:23:17 -070027 body_format: json
Srikanth Vavilapalli0ddb11f2016-01-29 14:29:26 -050028 method: POST