blob: 56c2ca3f0da20c3ea0d2f6a050fc9523b10b7731 [file] [log] [blame]
---
# tasks file for apigee-opdk-set-reachable can handle server type collections
- name: Validate that reachability has been provided
fail:
msg: "Please provide the reachability to set"
when: reachability is not defined
- name: Set uuid if router
set_fact:
uuid: '{{ edge_router_self.uUID }}'
when: edge_router_self is defined
- name: Set uuid if message processor
set_fact:
uuid: '{{ edge_mp_self.uUID }}'
when: edge_mp_self is defined
- name: Use local {{ local_mgmt_ip }} to set reachability to {{ reachability }} if set
uri:
user: '{{ opdk_user_email }}'
password: '{{ opdk_user_pass }}'
method: POST
body_format: raw
url: "http://{{ local_mgmt_ip }}:{{ ms_ext_mgmt_port }}/v1/servers/{{ uuid }}"
body: reachable={{ reachability }}
when: uuid is defined