The error was: 'dict object' has no attribute 'prefix'\n\n when my my dict does include a value - 'prefix' #561
-
SUMMARY I am creating a new prefix with the module netbox.netbox.netbox_prefix. Registering the netbox dict as a variable then trying to filter a value in another task. "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'prefix'\n\nThe error appears to be in '/tmp/bwrap_1661_kmw00u2r/awx_1661_4u8n4f49/project/ReserveIPNetbox.yml': line 66, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: "Set fact for Prefix"\n ^ here\n", STEPS TO REPRODUCE
EXPECTED RESULTS The variable should be set as just the prefix value of the dict. This works with exact same logic on the netbox.netbox.netbox_ip_address module, so not sure what is different about these dicts. I get a similar problem when I do an nblookup. It doesn't seem to find the value so it prints all my prefixes. This is an example of the prefix dict: {
When I just try to print the registered variable from netbox_prefix, I get: ok: [localhost] => { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It works for me, but its hard to troubleshoot your formatting is not using code blocks. Here is my example:
|
Beta Was this translation helpful? Give feedback.
It works for me, but its hard to troubleshoot your formatting is not using code blocks.
Here is my example: