nautobot-ansible
nautobot-ansible copied to clipboard
Plugin Module errors after creating a firewall policy
ISSUE TYPE
- Bug Report
SOFTWARE VERSIONS
pynautobot
1.5.0
Ansible:
2.12.3
Nautobot:
1.5.20
Collection:
4.5.0
SUMMARY
When using the plugin module to create a firewall policy the task errors, however the policy is actually created.
STEPS TO REPRODUCE
Create a device and obtain the UUID.
Use the plugin module to create a new firewall policy and attach it to the device using the UUID
- name: "SETUP FIREWALL POLICY"
networktocode.nautobot.plugin:
url: "{{ nb_url }}"
token: "{{ nb_token }}"
validate_certs: "{{ nb_validate_certs }}"
api_version: "{{ nb_api_version }}"
plugin: "firewall"
endpoint: "policy"
identifiers:
name: "MY_POLICY"
attrs:
description: "My policy"
status: "active"
assigned_devices:
- device: 1f51f71c-35f3-49fe-8d38-18be7bf5964b
weight: 100
state: "present"
EXPECTED RESULTS
The ansible task doesn't report an error.
ACTUAL RESULTS
The firewall policy is created however the playbook task fails with the below:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: Value of unknown type: <class 'pynautobot.core.response.Record'>, MY_POLICY