forked from NationTech/harmony
feat(watchguard): debut d'automation, structure tftp
This commit is contained in:
26
watchguard/ansible/apiCallTest.yml
Normal file
26
watchguard/ansible/apiCallTest.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: Make an HTTPS API call with basic auth
|
||||
hosts: localhost
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: Make API call
|
||||
uri:
|
||||
#url: "https://192.168.1.1/api/dhcpv4/leases/searchLease/"
|
||||
#url: "{{ API_URL }}/dhcpv4/leases/searchLease/"
|
||||
#url: "{{ API_URL }}/core/system/status"
|
||||
#url: "{{ API_URL }}/core/menu/search/?=1725020077211"
|
||||
url: "{{ API_URL }}/dhcpv4/service/status/"
|
||||
#https://192.168.1.1/api/core/menu/search/?_=1725020077211
|
||||
method: GET
|
||||
user: "{{ API_KEY }}"
|
||||
password: "{{ API_SECRET }}"
|
||||
force_basic_auth: yes
|
||||
validate_certs: no
|
||||
return_content: yes
|
||||
register: api_response
|
||||
|
||||
- name: Print API response
|
||||
debug:
|
||||
var: api_response.content
|
||||
|
||||
Reference in New Issue
Block a user