Manage the system attributes on Cisco NXOS devices
Version added: 1.0.0
- This module provides declarative management of node system attributes on Cisco NXOS devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
Note
- Unsupported for Cisco MDS
- For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide <nxos_platform_options>`
- For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
- For more information on using Ansible to manage Cisco devices see the Cisco integration page.
- name: configure hostname and domain-name
cisco.nxos.nxos_system:
hostname: nxos01
domain_name: test.example.com
- name: remove configuration
cisco.nxos.nxos_system:
state: absent
- name: configure name servers
cisco.nxos.nxos_system:
name_servers:
- 8.8.8.8
- 8.8.4.4
- name: configure name servers with VRF support
cisco.nxos.nxos_system:
name_servers:
- {server: 8.8.8.8, vrf: mgmt}
- {server: 8.8.4.4, vrf: mgmt}
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
commands
list
|
always |
The list of configuration mode commands to send to the device
Sample:
['hostname nxos01', 'ip domain-name test.example.com']
|
- Peter Sprygada (@privateip)