community.general.pn_switch_setup (0.1.1) — module

CLI command to modify switch-setup

Authors: Pluribus Networks (@rajaspachipulusu17)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module can be used to modify switch setup.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify switch
  pn_switch_setup:
    pn_cliswitch: "sw01"
    state: "update"
    pn_timezone: "America/New_York"
    pn_in_band_ip: "20.20.1.1"
    pn_in_band_netmask: "24"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify switch
  pn_switch_setup:
    pn_cliswitch: "sw01"
    state: "update"
    pn_in_band_ip6: "2001:0db8:85a3::8a2e:0370:7334"
    pn_in_band_netmask_ip6: "127"

Inputs

    
state:
    choices:
    - update
    description:
    - State the action to perform. Use C(update) to modify the switch-setup.
    required: true
    type: str

pn_date:
    description:
    - Date.
    required: false
    type: str

pn_motd:
    description:
    - Message of the Day.
    required: false
    type: str

pn_force:
    description:
    - Force analytics-store change even if it involves removing data.
    required: false
    type: bool

pn_banner:
    description:
    - Banner to display on server-switch.
    required: false
    type: str

pn_dns_ip:
    description:
    - DNS IP address.
    required: false
    type: str

pn_mgmt_ip:
    description:
    - Management IP address.
    required: false
    type: str

pn_mgmt_ip6:
    description:
    - IPv6 address.
    required: false
    type: str

pn_password:
    description:
    - plain text password.
    required: false
    type: str

pn_timezone:
    description:
    - Timezone to be configured.
    required: false
    type: str

pn_cliswitch:
    description:
    - Target switch to run the CLI on.
    required: false
    type: str

pn_gateway_ip:
    description:
    - gateway IPv4 address.
    required: false
    type: str

pn_in_band_ip:
    description:
    - data in-band IP address.
    required: false
    type: str

pn_ntp_server:
    description:
    - NTP server.
    required: false
    type: str

pn_domain_name:
    description:
    - Domain name.
    required: false
    type: str

pn_gateway_ip6:
    description:
    - Gateway IPv6 address.
    required: false
    type: str

pn_in_band_ip6:
    description:
    - Data in-band IPv6 address.
    required: false
    type: str

pn_loopback_ip:
    description:
    - loopback IPv4 address.
    required: false
    type: str

pn_switch_name:
    description:
    - switch name.
    required: false
    type: str

pn_loopback_ip6:
    description:
    - loopback IPv6 address.
    required: false
    type: str

pn_mgmt_netmask:
    description:
    - Netmask.
    required: false
    type: str

pn_eula_accepted:
    choices:
    - 'true'
    - 'false'
    description:
    - Accept EULA.
    required: false
    type: str

pn_eula_timestamp:
    description:
    - EULA timestamp.
    required: false
    type: str

pn_analytics_store:
    choices:
    - default
    - optimized
    description:
    - type of disk storage for analytics.
    required: false
    type: str

pn_in_band_netmask:
    description:
    - Data in-band netmask.
    required: false
    type: str

pn_dns_secondary_ip:
    description:
    - secondary DNS IP address.
    required: false
    type: str

pn_mgmt_netmask_ip6:
    description:
    - IPv6 netmask.
    required: false
    type: str

pn_enable_host_ports:
    description:
    - Enable host ports by default.
    required: false
    type: bool

pn_in_band_ip6_assign:
    choices:
    - none
    - autoconf
    description:
    - Data IPv6 address assignment.
    required: false
    type: str

pn_mgmt_ip_assignment:
    choices:
    - none
    - dhcp
    description:
    - IP address assignment.
    required: false
    type: str

pn_in_band_netmask_ip6:
    description:
    - Data in-band IPv6 netmask.
    required: false
    type: str

pn_mgmt_ip6_assignment:
    choices:
    - none
    - autoconf
    description:
    - IPv6 address assignment.
    required: false

pn_ntp_secondary_server:
    description:
    - Secondary NTP server.
    required: false
    type: str

Outputs

changed:
  description: indicates whether the CLI caused changes on the target.
  returned: always
  type: bool
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stderr:
  description: set of error responses from the switch-setup command.
  returned: on error
  type: list
stdout:
  description: set of responses from the switch-setup command.
  returned: always
  type: list