- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Enum Value Invalid - Not sure what this is telling me
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2021 09:32 AM
Here's my playbook and the error I'm getting. It appears to be related to the CL_RTR_INT entensible attributes I'm setting using variables.
---
- name: test next ip
hosts: 10.x.x.x
connection: local
gather_facts: False
vars:
router_a:
tunnel_a:
network: 10.255.64.0/22
rtr_a: 'Router A'
rtr_a_int: 'Tunnel1'
tasks:
- name: Obtain Creds
include_vars: "/automation/ansible/gitlab/infoblox_ip_clt_rem/ansible_vault/SVC-NET-TOWER-VAULT.yml"
no_log: true
- name: "Return next available IP address for router A tunnels"
set_fact:
tunnel1: "{{ lookup('nios_next_ip', router_a.tunnel_a.network, num=2, exclude=['10.x.x.1', '10.x.x.2', '10.x.x.3', '10.x.x.4', '10.x.x.5' ], provider=cli_infoblox ) }}"
- name: dynamically add host record to next available tunnel ip
infoblox.nios_modules.nios_host_record:
name: "{{ item }}"
dns: false
ipv4:
- address: "{{ item }}"
comment: this is a test comment
extattrs:
Application_ID: A00000
Client_Site_#: "{{ client_num }}-{{ client_name }} - ({{ city }}, {{ state }})"
CL_RTR_INT: "[ {{ 'router_a.tunnel_a.rtr_a' }}, {{ 'router_a.tunnel_a.rtr_a_int' }} ]"
state: present
provider: "{{ cli_infoblox }}"
loop:
- '{{ tunnel1[0] }}'
delegate_to: localhost
Error message is below.
},
"item": "10.x.x.4",
"msg": "Enum Value Invalid: name: CL_RTR_INT, value: [ Router A, Tunnel1 ].",
"operation": "create_object",
"type": "AdmConDataError"
}
Router A and Tunnel1 are the correct extensible attribute names.
Solved! Go to Solution.
Re: Enum Value Invalid - Not sure what this is telling me
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2021 10:22 AM
so I figured out what I was doing wrong.
This:
CL_RTR_INT: "[ {{ 'router_a.tunnel_a.rtr_a' }}, {{ 'router_a.tunnel_a.rtr_a_int' }} ]"
was changed to this:
CL_RTR_INT: "{{ [ item.rtr_a, item.rtr_a_int ] }}"