chore: Reorganize file tree for easier onboarding. Rust project now at the root for simple git clone && cargo run
This commit is contained in:
35
data/watchguard/ansible/dhcp-network-boot.yml
Normal file
35
data/watchguard/ansible/dhcp-network-boot.yml
Normal 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 }}"
|
||||
|
||||
Reference in New Issue
Block a user