Note
This plugin is part of the dellemc.enterprise_sonic collection (version 1.1.0).
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 dellemc.enterprise_sonic
.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_system
.
New in version 1.0.0: of dellemc.enterprise_sonic
Note
This module has a corresponding action plugin.
Parameter | Choices/Defaults | Comments | ||
---|---|---|---|---|
config dictionary | Specifies the system related configurations | |||
anycast_address dictionary | Specifies different types of anycast address that can be configured on the device | |||
ipv4 boolean |
| Enable or disable ipv4 anycast-address | ||
ipv6 boolean |
| Enable or disable ipv6 anycast-address | ||
mac_address string | Specifies the mac anycast-address | |||
hostname string | Specifies the hostname of the SONiC device | |||
interface_naming string |
| Specifies the type of interface-naming in device | ||
state string |
| Specifies the operation to be performed on the system parameters configured on the device. In case of merged, the input configuration will be merged with the existing system configuration on the device. In case of deleted the existing system configuration will be removed from the device. |
Note
check_mode
.# Using deleted # # Before state: # ------------- #! #SONIC(config)#do show running-configuration #! #ip anycast-mac-address aa:bb:cc:dd:ee:ff #ip anycast-address enable #ipv6 anycast-address enable #interface-naming standard - name: Merge provided configuration with device configuration dellemc.enterprise_sonic.sonic_system: config: hostname: SONIC interface_naming: standard anycast_address: ipv6: true state: deleted # After state: # ------------ #! #sonic(config)#do show running-configuration #! #ip anycast-mac-address aa:bb:cc:dd:ee:ff #ip anycast-address enable # Using deleted # # Before state: # ------------- #! #SONIC(config)#do show running-configuration #! #ip anycast-mac-address aa:bb:cc:dd:ee:ff #ip anycast-address enable #ipv6 anycast-address enable #interface-naming standard - name: Delete all system related configs in device configuration dellemc.enterprise_sonic.sonic_system: config: state: deleted # After state: # ------------ #! #sonic(config)#do show running-configuration #! # Using merged # # Before state: # ------------- #! #sonic(config)#do show running-configuration #! - name: Merge provided configuration with device configuration dellemc.enterprise_sonic.sonic_system: config: hostname: SONIC interface_naming: standard anycast_address: ipv6: true ipv4: true mac_address: aa:bb:cc:dd:ee:ff state: merged # After state: # ------------ #! #SONIC(config)#do show running-configuration #! #ip anycast-mac-address aa:bb:cc:dd:ee:ff #ip anycast-address enable #ipv6 anycast-address enable #interface-naming standard
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
after list / elements=string | when changed | The resulting configuration model invocation. Sample: The configuration returned will always be in the same format of the parameters above. |
before list / elements=string | always | The configuration prior to the model invocation. Sample: The configuration returned will always be in the same format of the parameters above. |
commands list / elements=string | always | The set of commands pushed to the remote device. Sample: ['command 1', 'command 2', 'command 3'] |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_system_module.html