arubanetworks.aruba_central.central_variables (1.0.3) — module

REST API module for device variables on Aruba Central

| "added in version" 2.9.0 of arubanetworks.aruba_central"

Authors: unknown

preview | supported by community

Install collection

Install with ansible-galaxy collection install arubanetworks.aruba_central:==1.0.3


Add to requirements.yml

  collections:
    - name: arubanetworks.aruba_central
      version: 1.0.3

Description

This module provides a mechanism to interact with configuration variables for devices managed by Aruba Central. It supports the upload of a JSON-based file wherein variables for all/multiple devices are defined, organized by device serial number.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
#Usage Examples
- name: Get variables for a single device
  central_variables:
    action: get
    device_serial: CNXXXXXXXX
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get variables for all(20) devices
  central_variables:
    action: get_all
    limit: 20
    offset: 0
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create/set template variables for all/multiple devices using a JSON file  # NOQA
  central_variables:
    action: create_all
    local_file_path: /home/user/variables.json
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create/set template variables for a single device using device serial
  central_variables:
    action: create
    device_serial: CNXXXXXXXX
    device_mac: aa:aa:aa:bb:bb:bb
    variables:
      zonename: First-Floor
      ssid_name: Employee-test
      vc_name: Instant-AP_VC
      hostname: IAP-1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update template variables for all/multiple devices using a JSON file
  central_variables:
    action: update_all
    local_file_path: /home/user/variables.json
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update template variables for a single device
  central_variables:
    action: update
    device_serial: CNXXXXXXXX
    device_mac: aa:aa:aa:bb:bb:bb
    variables:
      zonename: Lobby
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Replace all or delete some of the template variables for all/multiple devices using a JSON file  # NOQA
  central_variables:
    action: replace_all
    local_file_path: /home/user/variables.json
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Replace all or delete some of the template variables for a single device
  central_variables:
    action: replace
    device_serial: CNXXXXXXXX
    device_mac: aa:aa:aa:bb:bb:bb
    variables:
      zonename: Second-Floor
      hostname: IAP-2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete all template variables for a single device
  central_variables:
    action: delete
    device_serial: CNXXXXXXXX

Inputs

    
limit:
    default: 20
    description:
    - Maximum number of records to be returned
    - Used optionally as a filter parameter for I(get_all)
    required: false
    type: int

action:
    choices:
    - get
    - get_all
    - create
    - create_all
    - update
    - update_all
    - replace
    - replace_all
    - delete
    description:
    - Action to be performed on the variable(s) for the device(s)
    - I(get) - Gets all variables for a single device.
    - I(get_all) - Gets all variables for all devices
    - I(create) - Creates new, i.e. previously undefined, variables for a single device.
    - I(create_all) - Creates new variables for multiple/all devices using a JSON file
      upload. Essentially performs the I(create) operation for multiple/all devices.
    - I(update) - Updates existing variables as well as creates new variables for a single
      device. Does not remove existing variables that are not defined in this operation.
      Adds new variables that are defined in this operation.
    - I(update_all) - Updates variables for multiple/all devices using a JSON file upload.
      Essentially performs the I(update) operation for multiple/alldevices.
    - I(replace) - Replaces existing variables as well as creates new variables for a
      single device. Removes existing variables that are not defined in this operation.
      Adds new variables that are defined in this operation.
    - I(replace_all) - Replaces variables for all devices using a JSON file upload.Essentially
      performs the I(replace) operation for all devices
    - I(delete) - Removes all variables for a single device
    required: true
    type: str

offset:
    default: 0
    description:
    - Number of items to be skipped before returning the data, which is useful for pagination
    - Used optionally as a filter parameter for I(get_all)
    required: false
    type: int

variables:
    description:
    - Dictionary containing variables to be applied to a single device
    - Contains key-value pairs wherein the key is the variable name and value is the variable
      value
    - Used with actions I(create), I(update), and I(replace)
    required: false
    type: dict

device_mac:
    description:
    - MAC address of the device
    - Used with actions I(create), I(update), and I(replace)
    required: false
    type: str

device_serial:
    description:
    - Serial number of the device
    - Used with actions I(get), I(create), I(update), I(replace), and I(delete)
    required: false
    type: str

local_file_path:
    description:
    - Full local file path for a JSON file that consist variables for all/multiple devices
      based on device serial number
    - Used with actions "create_all", I(update_all), and I(replace_all)
    required: false
    type: str