cv_server_provision – Provision server port by applying or removing template configuration to an Arista CloudVision Portal configlet that is applied to a switch¶
New in version 2.4.
Synopsis¶
- This module allows a server team to provision server network ports for new servers without having to access Arista CVP or asking the network team to do it for them. Provide the information for connecting to CVP, switch rack, port the new server is connected to, optional vlan, and an action and the module will apply the configuration to the switch port via CVP. Actions are add (applies template config to port), remove (defaults the interface config) and show (returns the current port config).
Requirements¶
The below requirements are needed on the host that executes this module.
- Jinja2
- cvprac >= 0.7.0
Parameters¶
Examples¶
- name: Get current configuration for interface Ethernet2
  cv_server_provision:
    host: cvp_node
    username: cvp_user
    password: cvp_pass
    protocol: https
    server_name: new_server
    switch_name: eos_switch_1
    switch_port: 2
    template: template_file.j2
    action: show
- name: Remove existing configuration from interface Ethernet2. Run task.
  cv_server_provision:
    host: cvp_node
    username: cvp_user
    password: cvp_pass
    protocol: https
    server_name: new_server
    switch_name: eos_switch_1
    switch_port: 2
    template: template_file.j2
    action: remove
    auto_run: True
- name: Add template configuration to interface Ethernet2. No VLAN. Run task.
  cv_server_provision:
    host: cvp_node
    username: cvp_user
    password: cvp_pass
    protocol: https
    server_name: new_server
    switch_name: eos_switch_1
    switch_port: 2
    template: single_attached_trunk.j2
    action: add
    auto_run: True
- name: Add template with VLAN configuration to interface Ethernet2. Run task.
  cv_server_provision:
    host: cvp_node
    username: cvp_user
    password: cvp_pass
    protocol: https
    server_name: new_server
    switch_name: eos_switch_1
    switch_port: 2
    port_vlan: 22
    template: single_attached_vlan.j2
    action: add
    auto_run: True
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- EOS+ CS (ansible-dev@arista.com) (@mharista)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
