Skip to content

Latest commit

 

History

History
934 lines (503 loc) · 20.5 KB

netbox_wireless_link_module.rst

File metadata and controls

934 lines (503 loc) · 20.5 KB
orphan

netbox.netbox.netbox_wireless_link module -- Creates or removes Wireless links from NetBox

Note

This module is part of the netbox.netbox collection (version 3.9.0).

To install it, use: ansible-galaxy collection install netbox.netbox. You need further requirements to be able to use this module, see Requirements <ansible_collections.netbox.netbox.netbox_wireless_link_module_requirements> for details.

To use it in a playbook, specify: netbox.netbox.netbox_wireless_link.

netbox.netbox 3.5.0

Synopsis

  • Creates or removes wireless links from NetBox

The below requirements are needed on the host that executes this module.

  • pynetbox

Parameters

ansible-option-table

Parameter Comments

cert

ansible-option-type-line

any

Certificate path

data

ansible-option-type-line

dictionary / required

Defines the wireless link configuration

auth_cipher

ansible-option-type-line

string

The authentication cipher of the wireless link

ansible-option-line

Choices:

  • auto
  • tkip
  • aes

auth_psk

ansible-option-type-line

string

The PSK of the wireless link

auth_type

ansible-option-type-line

string

The authentication type of the wireless link

ansible-option-line

Choices:

  • open
  • wep
  • wpa-personal
  • wpa-enterprise

custom_fields

ansible-option-type-line

dictionary

must exist in NetBox

description

ansible-option-type-line

string

Description of the wireless link

interface_a

ansible-option-type-line

any / required

Interface A of the wireless link

interface_b

ansible-option-type-line

any / required

Interface A of the wireless link

ssid

ansible-option-type-line

string

The SSID of the wireless link

status

ansible-option-type-line

string

The status of the wireless link

ansible-option-line

Choices:

  • connected
  • planned
  • decommissioning

tags

ansible-option-type-line

list / elements=any

Any tags that the wireless link may need to be associated with

netbox_token

ansible-option-type-line

string / required

The NetBox API token.

netbox_url

ansible-option-type-line

string / required

The URL of the NetBox instance.

Must be accessible by the Ansible control host.

query_params

ansible-option-type-line

list / elements=string

This can be used to override the specified values in ALLOWED_QUERY_PARAMS that are defined

in plugins/module_utils/netbox_utils.py and provides control to users on what may make

an object unique in their environment.

state

ansible-option-type-line

string

The state of the object.

ansible-option-line

Choices:

  • present ← (default)
  • absent

validate_certs

ansible-option-type-line

any

If no, SSL certificates will not be validated.

This should only be used on personally controlled sites using a self-signed certificates.

ansible-option-line

Default: "true"

Notes

Note

- This should be ran with connection local and hosts localhost

Examples

- name: "Test NetBox module"
  connection: local
  hosts: localhost
  gather_facts: False
  tasks:
    - name: Create wireless link within NetBox with only required information
      netbox_wireless_link:
        netbox_url: http://netbox.local
        netbox_token: thisIsMyToken
        data:
          interface_a:
            device: Device One
            name: wireless_link_0
          interface_b:
            device: Device Two
            name: wireless_link_0
        state: present

    - name: Delete wireless link within netbox
      netbox_wireless_link:
        netbox_url: http://netbox.local
        netbox_token: thisIsMyToken
        data:
          interface_a:
            device: Device One
            name: wireless_link_0
          interface_b:
            device: Device Two
            name: wireless_link_0
        state: absent

    - name: Create wireless link with all parameters
      netbox_wireless_link:
        netbox_url: http://netbox.local
        netbox_token: thisIsMyToken
        data:
          interface_a:
            device: Device One
            name: wireless_link_0
          interface_b:
            device: Device Two
            name: wireless_link_0
          ssid: Wireless Network One          
          description: Cool Wireless Network
          auth_type: wpa-enterprise
          auth_cipher: aes
          auth_psk: psk123456                    
          tags:
            - tagA
            - tagB
            - tagC
        state: present

Return Values

Common return values are documented here <common_return_values>, the following are the fields unique to this module:

ansible-option-table

Key Description

msg

ansible-option-type-line

string

Message indicating failure or info about what has been achieved

ansible-option-line

Returned: always

wireless_link

ansible-option-type-line

dictionary

Serialized object as created or already existent within NetBox

ansible-option-line

Returned: on creation

Authors

  • Martin Rødvand (@rodvand)

Issue Tracker Repository (Sources)