netbox_community / netbox_community.ansible_modules / 0.1.10 / module / netbox_vrf Create, update or delete vrfs within Netbox | "added in version" 0.1.0 of netbox_community.ansible_modules" Authors: Mikhail Yohman (@FragmentedPacket) preview | supported by communitynetbox_community.ansible_modules.netbox_vrf (0.1.10) — module
Install with ansible-galaxy collection install netbox_community.ansible_modules:==0.1.10
collections: - name: netbox_community.ansible_modules version: 0.1.10
Creates, updates or removes vrfs from Netbox
- name: "Test Netbox modules" connection: local hosts: localhost gather_facts: False tasks: - name: Create vrf within Netbox with only required information netbox_vrf: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Test VRF state: present - name: Delete vrf within netbox netbox_vrf: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Test VRF state: absent - name: Create vrf with all information netbox_vrf: netbox_url: http://netbox.local netbox_token: thisIsMyToken data: name: Test VRF rd: "65000:1" tenant: Test Tenant enforce_unique: true description: VRF description tags: - Schnozzberry state: present
data: description: - Defines the vrf configuration required: true suboptions: custom_fields: description: - must exist in Netbox description: description: - The description of the vrf enforce_unique: description: - Prevent duplicate prefixes/IP addresses within this VRF type: bool name: description: - The name of the vrf required: true rd: description: - The RD of the VRF. Must be quoted to pass as a string. type: str tags: description: - Any tags that the vrf may need to be associated with tenant: description: - The tenant that the vrf will be assigned to state: choices: - absent - present default: present description: - Use C(present) or C(absent) for adding or removing. netbox_url: description: - URL of the Netbox instance resolvable by Ansible control host required: true netbox_token: description: - The token created within Netbox to authorize API access required: true validate_certs: default: 'yes' description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool
msg: description: Message indicating failure or info about what has been achieved returned: always type: str vrf: description: Serialized object as created or already existent within Netbox returned: success (when I(state=present)) type: dict