dellemc.enterprise_sonic.sonic_pim_interfaces module – Manage interface-specific PIM configurations on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).
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_pim_interfaces
.
New in dellemc.enterprise_sonic 2.5.0
Synopsis
- This module provides configuration management of interface-specific PIM parameters for devices running SONiC.
- BFD profiles need to be created earlier in the device.
Parameters
Parameter | Comments |
---|---|
config list / elements=dictionary | Specifies interface-specific PIM configurations. |
bfd_enable boolean |
Enable BFD support for PIM. Choices:
|
bfd_profile string |
Specifies the BFD profile to be enabled. BFD support for PIM has to be enabled for configuring BFD profile. |
drpriority integer |
Specifies the Designated Router Priority. The range is from 1 to 4294967295. |
hello_interval integer |
Specifies the Hello interval in seconds. The range is from 1 to 255. |
name string / required |
Full name of the interface. |
sparse_mode boolean |
Enable PIM sparse-mode. Choices:
|
state string | The state of the configuration after module completion.
Choices:
|
Notes
Note
- Supports
check_mode
.
Examples
# Using deleted # # Before State: # ------------- # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim drpriority 10 # ip pim hello 60 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # ip pim hello 60 # ip pim bfd # sonic# - name: Delete specified interface PIM configurations dellemc.enterprise_sonic.sonic_pim_interfaces: config: - name: 'Eth1/1' hello_interval: 60 bfd_profile: profile_1 - name: 'Eth1/2' state: deleted # After State: # ------------ # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim drpriority 10 # ip pim bfd # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # sonic# # Using deleted # # Before State: # ------------- # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim drpriority 10 # ip pim hello 60 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # ip pim hello 60 # ip pim bfd # sonic# - name: Delete all interface-specific PIM configurations dellemc.enterprise_sonic.sonic_pim_interfaces: config: state: deleted # After State: # ------------ # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # sonic# # Using merged # # Before State: # ------------- # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim hello 45 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # sonic# - name: Merge provided interface PIM configurations dellemc.enterprise_sonic.sonic_pim_interfaces: config: - name: 'Eth1/1' drpriority: 10 hello_interval: 60 bfd_enable: true bfd_profile: profile_1 - name: 'Eth1/2' hello_interval: 60 bfd_enable: true state: merged # After State: # ------------ # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim drpriority 10 # ip pim hello 60 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # ip pim hello 60 # ip pim bfd # sonic# # Using replaced # # Before State: # ------------- # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim drpriority 10 # ip pim hello 45 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # ip pim hello 60 # ip pim bfd # sonic# - name: Replace PIM configurations for specified interfaces dellemc.enterprise_sonic.sonic_pim_interfaces: config: - name: 'Eth1/1' hello_interval: 60 bfd_enable: true bfd_profile: profile_1 state: replaced # After State: # ------------ # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim hello 60 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # ip pim hello 60 # ip pim bfd # sonic# # Using overridden # # Before State: # ------------- # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim sparse-mode # ip pim drpriority 10 # ip pim hello 45 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # ip pim hello 60 # ip pim bfd # sonic# - name: Override interface-specific PIM configurations dellemc.enterprise_sonic.sonic_pim_interfaces: config: - name: 'Eth1/1' hello_interval: 60 bfd_enable: true bfd_profile: profile_1 state: overridden # After State: # ------------ # # sonic# show running-configuration interface Eth 1/1 | grep "ip pim" # ip pim hello 60 # ip pim bfd # ip pim bfd profile profile_1 # sonic# show running-configuration interface Eth 1/2 | grep "ip pim" # sonic#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
---|---|
after list / elements=string | The resulting configuration on module invocation. Returned: when changed Sample: |
after(generated) list / elements=string | The generated configuration on module invocation. Returned: when Sample: |
before list / elements=string | The configuration prior to the module invocation. Returned: always Sample: |
commands list / elements=string | The set of commands pushed to the remote device. Returned: always Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_pim_interfaces_module.html