From 4317c2c80c7af0e368e082259fa2f716c03a5f66 Mon Sep 17 00:00:00 2001 From: "Jose l. Azagra" Date: Sat, 22 Aug 2020 18:10:44 +0200 Subject: [PATCH] Update uri.py (#67688) Adds an example of creating workspaces in Log analytics Azure Co-authored-by: Alicia Cozine --- lib/ansible/modules/uri.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/ansible/modules/uri.py b/lib/ansible/modules/uri.py index 3becd88a339..f13ddb47321 100644 --- a/lib/ansible/modules/uri.py +++ b/lib/ansible/modules/uri.py @@ -278,6 +278,20 @@ EXAMPLES = r''' src: /path/to/my/file.json remote_src: yes +- name: Create workspaces in Log analytics Azure + uri: + url: https://www.mms.microsoft.com/Embedded/Api/ConfigDataSources/LogManagementData/Save + method: POST + body_format: json + status_code: [200, 202] + return_content: true + headers: + Content-Type: application/json + x-ms-client-workspace-path: /subscriptions/{{ sub_id }}/resourcegroups/{{ res_group }}/providers/microsoft.operationalinsights/workspaces/{{ w_spaces }} + x-ms-client-platform: ibiza + x-ms-client-auth-token: "{{ token_az }}" + body: + - name: Pause play until a URL is reachable from this host uri: url: "http://192.0.2.1/some/test"