feat(watchguard): debut d'automation, structure tftp

This commit is contained in:
2024-09-02 07:49:56 -04:00
parent 411e3ce8cd
commit 231b1cca9f
27 changed files with 475 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
---
#- hosts: all
# connection: local # execute modules on controller
# gather_facts: no
# module_defaults:
# - name: Example
# ansibleguy.opnsense.alias:
# firewall: "{{ ansible_host }}"
# api_credential_file: "./opnsense.key"
#
# tasks:
# - name: Example
# ansibleguy.opnsense.alias:
# name: 'ANSIBLE_TEST1'
# content: ['1.1.1.1']
- name: Get list of users from OPNsense
hosts: localhost
gather_facts: no
tasks:
- name: Retrieve users
uri:
url: "{{ opnsense_url }}/api/system/user"
method: GET
headers:
Authorization: "Bearer {{ api_key }}"
Content-Type: "application/json"
validate_certs: no
register: users_response
- name: Display list of users
debug:
msg: "{{ users_response.json }}"