- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Create network using ansible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2022 08:17 AM
Hello,
we are testing the creation of the network via ansible tasks from our playbook above
tasks:
- name: create network
infoblox.nios_modules.nios_network:
network: 192.168.5.0/24
network_view: default
options:
- name: domain-name
value: dc01-dev
extattrs:
Site: test site
comment: Created with Ansible
state: present
provider: "{{ nios_provider }}"
i have an error
AdmConProtoError: Field is not readable: template code Client.Ibap.Proto\" text\": \"Field is not readable: template\"\\n}'\nTraceback (most recent call last):\n File \"/usr/local/lib/python3.8/site-packages/infoblox_client/connector.py\", line 317, in get_obj…
any idea
B.Regards
Anas
Re: Create network using ansible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2022 07:04 AM
Hi Anas,
Could you try running the below snippet as a playbook.
--- - hosts: localhost vars: nios_provider: host: <grid> username: admin password: infoblox connection: local tasks: - name: create network nios_network: network: 192.168.5.0/24 options: - name: domain-name value: dc01-dev network_view: default extattrs: Site: Test Site comment: Created with Ansible state: present provider: "{{ nios_provider }}"
Re: Create network using ansible
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 01:53 AM - edited 11-29-2022 05:13 AM
hello,
thank you for your reply, i got syntax error trying to excuste your playbook, because we need to specify the collection first
error:
module_stderr": "Failed on object search with url https://infoblox_url/wapi/v2.1/network?network=192.168.11.0%2F24&network_view=default&_return_fields...: b'{ \"Error\": \"AdmConProtoError: Field is not readable: template\", \\n \"code\": \"Client.Ibap.Proto\", \\n \"text\": \"Field is not readable: template\"\\n}'\nFailed on object search with url https://infoblox_url/wapi/v2.1/network?network=192.168.11.0%2F24&network_view=default&_return_fields...: b'{ \"Error\": \"AdmConProtoError: Field is not readable: template\", \\n \"code\": \"Client.Ibap.Proto\", \\n \"text\": \"Field is not readable: template\"\\n}'\nTraceback (most recent call last):\n File \"/usr/local/lib/python3.8/site-packages/infoblox_client/connector.py\", line 317, in get_obj…
Re: Create network using ansible
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2022 03:35 AM
The playbook looks good. You could check if the ansible or infoblox-client needs to be updated.
You can run the below snippet to check the outdated pip modules:
pip3 list --outdated
The below snippet will update all the outdated modules:
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U