New in version 2.2.
Execute trunk-create or trunk-delete command. Trunks can be used to aggregate network links at Layer 2 on the local switch. Use this command to create a new trunk.
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| pn_broadcast_level | no | Specify a broadcast level in percent. The default value is 100%. |
||
| pn_clipassword | no | Provide login password if user is not root. |
||
| pn_cliswitch | no | Target switch(es) to run the cli on. |
||
| pn_cliusername | no | Provide login username if user is not root. |
||
| pn_description | no | Specify a description for the trunk configuration. |
||
| pn_edge_switch | no | Specify if the switch is an edge switch. |
||
| pn_egress_rate_limit | no | Specify an egress port data rate limit for the configuration. |
||
| pn_host | no | Host facing port control setting. |
||
| pn_jumbo | no | Specify if the port can receive jumbo frames. |
||
| pn_lacp_fallback | no |
| Specify the LACP fallback mode as bundles or individual. |
|
| pn_lacp_fallback_timeout | no | Specify the LACP fallback timeout in seconds. The range is between 30 and 60 seconds with a default value of 50 seconds. |
||
| pn_lacp_mode | no |
| Specify the LACP mode for the configuration. |
|
| pn_lacp_priority | no | Specify the LACP priority. This is a number between 1 and 65535 with a default value of 32768. |
||
| pn_lacp_timeout | no |
| Specify the LACP time out as slow (30 seconds) or fast (4seconds). The default value is slow. |
|
| pn_loopback | no | Specify loopback if you want to use loopback. |
||
| pn_loopvlans | no | Specify a list of looping vlans. |
||
| pn_mirror_receive | no | Specify if the configuration receives mirrored traffic. |
||
| pn_name | yes | Specify the name for the trunk configuration. |
||
| pn_pause | no | Specify if pause frames are sent. |
||
| pn_port_macaddr | no | Specify the MAC address of the port. |
||
| pn_ports | no |
Specify the port number(s) for the link(s) to aggregate into the trunk.
Required for trunk-create.
|
||
| pn_routing | no | Specify if the port participates in routing on the network. |
||
| pn_speed | no |
| Specify the port speed or disable the port. |
|
| pn_unkown_mcast_level | no | Specify an unkown multicast level in percent. The default value is 100%. |
||
| pn_unkown_ucast_level | no | Specify an unkown unicast level in percent. The default value is 100%. |
||
| state | yes |
| State the action to perform. Use 'present' to create trunk, 'absent' to delete trunk and 'update' to modify trunk. |
- name: create trunk
pn_trunk:
state: 'present'
pn_name: 'spine-to-leaf'
pn_ports: '11,12,13,14'
- name: delete trunk
pn_trunk:
state: 'absent'
pn_name: 'spine-to-leaf'
Common return values are documented here Common Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| changed | Indicates whether the CLI caused changes on the target. | always | bool | |
| command | The CLI command run on the target node(s). | |||
| stderr | The set of error responses from the trunk command. | on error | list | |
| stdout | The set of responses from the trunk command. | always | list |
For more information on what this means please read Core Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/pn_trunk_module.html