community.network.cv_server_provision – Provision server port by applying or removing template configuration to an Arista CloudVision Portal configlet that is applied to a switch.¶
Note
This plugin is part of the community.network collection (version 2.1.1).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.cv_server_provision
.
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
community.network.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.
community.network.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.
community.network.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.
community.network.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:
Authors¶
EOS+ CS (ansible-dev@arista.com) (@mharista)