-
Hi everyone, I just started to evaluate OPNsense and its automation ability today and ran into this problem I really don't understand. I have you can give me some pointer to debug it further and find out why it's not working:
with this playbook (straight from the example section of the documentation with local adaptation): ---
- hosts: localhost
gather_facts: false
module_defaults:
group/ansibleguy.opnsense.all:
firewall: '192.168.1.71'
api_credential_file: 'credentials'
ssl_verify: false
debug: true
ansibleguy.opnsense.unbound_host:
match_fields: ['description']
ansibleguy.opnsense.list:
target: 'unbound_host'
tasks:
- name: Listing
ansibleguy.opnsense.list:
# target: 'unbound_host'
register: existing_entries
- name: Printing hosts
ansible.builtin.debug:
var: existing_entries.data
- name: Adding
ansibleguy.opnsense.unbound_host:
hostname: 'host'
domain: 'example.com'
value: '192.168.1.1'
description: 'host.example.com'
reload: false |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
After updating OPNsense, the error went away, so it had nothing to do with ansible. |
Beta Was this translation helpful? Give feedback.
-
Just for anyone else stumbling on this. I used |
Beta Was this translation helpful? Give feedback.
After updating OPNsense, the error went away, so it had nothing to do with ansible.