blob: be981c872576e5eca5a583f36ab3aaecb7594800 [file] [log] [blame]
Scott Baker31acc652016-06-23 15:47:56 -07001---
2- hosts: {{ instance_name }}
3 gather_facts: False
4 connection: ssh
5 user: {{ username }}
Sapan Bhatia22c5dca2017-02-07 11:32:56 -08006 become: yes
Scott Baker31acc652016-06-23 15:47:56 -07007
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 }}"
27 body_format: raw
28 method: POST