community.network.pn_switch_setup module – CLI command to modify switch-setup
Note
This module is part of the community.network collection (version 4.0.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.pn_switch_setup
.
Synopsis
This module can be used to modify switch setup.
Parameters
Parameter |
Comments |
---|---|
type of disk storage for analytics. Choices:
|
|
Banner to display on server-switch. |
|
Target switch to run the CLI on. |
|
Date. |
|
DNS IP address. |
|
secondary DNS IP address. |
|
Domain name. |
|
Enable host ports by default. Choices:
|
|
Accept EULA. Choices:
|
|
EULA timestamp. |
|
Force analytics-store change even if it involves removing data. Choices:
|
|
gateway IPv4 address. |
|
Gateway IPv6 address. |
|
data in-band IP address. |
|
Data in-band IPv6 address. |
|
Data IPv6 address assignment. Choices:
|
|
Data in-band netmask. |
|
Data in-band IPv6 netmask. |
|
loopback IPv4 address. |
|
loopback IPv6 address. |
|
Management IP address. |
|
IPv6 address. |
|
IPv6 address assignment. Choices:
|
|
IP address assignment. Choices:
|
|
Netmask. |
|
IPv6 netmask. |
|
Message of the Day. |
|
Secondary NTP server. |
|
NTP server. |
|
plain text password. |
|
switch name. |
|
Timezone to be configured. |
|
State the action to perform. Use Choices:
|
Examples
- name: Modify switch
community.network.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"
- name: Modify switch
community.network.pn_switch_setup:
pn_cliswitch: "sw01"
state: "update"
pn_in_band_ip6: "2001:0db8:85a3::8a2e:0370:7334"
pn_in_band_netmask_ip6: "127"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
indicates whether the CLI caused changes on the target. Returned: always |
|
the CLI command run on the target node. Returned: always |
|
set of error responses from the switch-setup command. Returned: on error |
|
set of responses from the switch-setup command. Returned: always |