uri update, fixed syntax
diff --git a/tasks/main.yml b/tasks/main.yml index 9f20feb..b706e2c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -17,7 +17,7 @@ when: edge_mp_self is defined and server_type == 'mp' - block: - - name: Set reachability to {{ reachable }} if set + - name: Use {{ public_mgmt_ip }} to set reachability to {{ reachable }} if set uri: user: '{{ opdk_user_email }}' password: '{{ opdk_user_pass }}' @@ -28,14 +28,14 @@ body: reachable: '{{ reachable }}' rescue: - - name: Set reachability to {{ reachable }} if set - uri: - user: '{{ opdk_user_email }}' - password: '{{ opdk_user_pass }}' - method: POST - body_format: json - force_basic_auth: yes - url: "http://{{ local_mgmt_ip }}:{{ ms_ext_mgmt_port }}/v1/servers/{{ uuid }}" - body: - reachable: '{{ reachable }}' + - name: Use {{ local_mgmt_ip }} to set reachability to {{ reachable }} if set + uri: + user: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + method: POST + body_format: json + force_basic_auth: yes + url: "http://{{ local_mgmt_ip }}:{{ ms_ext_mgmt_port }}/v1/servers/{{ uuid }}" + body: + reachable: '{{ reachable }}' when: uuid is defined