Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module for VTP configuration #1001

Open
UvixCreative opened this issue Dec 19, 2023 · 1 comment
Open

Add module for VTP configuration #1001

UvixCreative opened this issue Dec 19, 2023 · 1 comment
Labels
feature This issue/PR relates to a feature request.

Comments

@UvixCreative
Copy link
Contributor

SUMMARY

Create a module that can be used for configuring VTP

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

cisco.ios.vtp

ADDITIONAL INFORMATION

VLANs can be configured using the cisco.ios collection, but VTP is another well-established way of maintaining consistent VLANs across devices. Configuring VTP via Ansible could be useful for many use cases.

This can be accomplished currently with ios_commands, but that has no practical means of implementing idempotence.

I propose that the minimum implementation should enable configuring domain, mode, primary, password, and version. File, interface, pruning, and trunk could conceivably be added at a later time as I believe these to be far less common configurations.

---
- name: VTP demo playbook
  hosts: all
  gather_facts: false

  tasks:
    - name: "Configure VTP"
      cisco.ios.vtp:
        version: 3
        domain: Demo_Domain
        password: password123
        mode: server
        primary: true
@roverflow roverflow added the feature This issue/PR relates to a feature request. label Dec 20, 2023
@jdetwiler16
Copy link

I second this! Also, if anyone is looking for the code snippet to make a VTP server as primary, here you go!

- name: Make Device VTP Primary 
  cisco.ios.ios_command:
    commands:
    - command: 'vtp primary'
      check_all: true
      prompt: 
        - Enter VTP Password
        - No conflicting
      answer:
        - "{{ passwd_vtp }}"
        - y
  vars:
    ansible_command_timeout: 90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants