forked from inviqa/ansible-jumpcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first test of retriving duplicate inactive systems from JC
- Loading branch information
Showing
4 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
- name: Retrive the list of registeed systems with the same name | ||
uri: | ||
url: "{{ jumpcloud_api_v1_url }}/search/systems" | ||
method: POST | ||
headers: | ||
"Content-Type": "application/json" | ||
"Accept": "application/json" | ||
"x-api-key": "{{ jumpcloud_api_key }}" | ||
body_format: json | ||
body: '{ "filter" : | ||
{"and" : | ||
[{ "displayName" : "{{ jumpcloud_displayName }}" }, | ||
{"active" : "false" }] | ||
}, | ||
"fields": "displayName _id" }' | ||
follow_redirects: all | ||
return_content: yes | ||
status_code: 200 | ||
delegate_to: localhost | ||
register: jc_registered_systems_json_response | ||
when: jumpcloud_displayName is defined | ||
ignore_errors: yes | ||
|
||
- debug: | ||
var: jc_registered_systems_json_response | ||
|
||
- pause: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters