Module to manage the system attributes.
Version added: 1.0.0
- This module provides declarative management of node system attributes on Cisco IOS devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration.
Note
- Tested against Cisco IOSXE Version 17.3 on CML.
- This module works with connection
network_cli
. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html - 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.ios.ios_system:
hostname: ios01
domain_name: test.example.com
domain_search:
- ansible.com
- redhat.com
- cisco.com
- name: Remove configuration
cisco.ios.ios_system:
state: absent
- name: Configure DNS lookup sources
cisco.ios.ios_system:
lookup_source: MgmtEth0/0/CPU0/0
lookup_enabled: true
- name: Configure name servers
cisco.ios.ios_system:
name_servers:
- 8.8.8.8
- 8.8.4.4
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 ios01', 'ip domain name test.example.com']
|
- Peter Sprygada (@privateip)