forked from NationTech/harmony
chore: Reorganize file tree for easier onboarding. Rust project now at the root for simple git clone && cargo run
This commit is contained in:
18
data/watchguard/ansible/ansible-api-test.sh
Executable file
18
data/watchguard/ansible/ansible-api-test.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# You first need to do a few things on opnsense web interface:
|
||||
# - enable ssh
|
||||
# - create a nationtech user (member of admin) with an API key (system / access /users)
|
||||
# - get an API key / secret
|
||||
|
||||
#ansible-galaxy collection install ansible.posix
|
||||
#ansible-galaxy collection install ansibleguy.opnsense
|
||||
|
||||
export API_KEY="wQTI+b1VcI2ox3NdB86dySN28TVYusaWUdimFNSMweOeyr++pp6xccPXBBxGoSy9arNhzlTprx5+28IL"
|
||||
export API_SECRET="eOLbAqZkTKMRXEdqjXUdlWLssd7q0bKBt5vNMgPutsc+V2qO4Yh/C9Z1OmBezcuxZdbVCLAjeru1c6zr"
|
||||
|
||||
ansible-playbook apiCallTest.yml \
|
||||
-e API_URL="https://192.168.1.1/api" \
|
||||
-e API_KEY="${API_KEY}" \
|
||||
-e API_SECRET="${API_SECRET}"
|
||||
|
||||
Reference in New Issue
Block a user