When attempting to create a new vspan session subsequent runs will create an identically named rule, End goal for me personally was to allow multiple destination_vms to be defined but this does not appear to be possible currently.
Run the below playbook with the requirements of this collection installed. Requires a DVS and a VM with the correct nic label within the targeted vcenter.
- name: Create Port Mirroring - remoteMirrorDest
hosts: localhost
connection: local
vars_prompt:
- name: ldap_password
prompt: Please enter your credentials
tasks:
- community.vmware.vmware_vspan_session:
hostname: "{{ vcenter_hostname }}"
username: xxx
password: "{{ ldap_password }}"
validate_certs: no
name: "Mirror - TEST "
description: Mirroring configuration - TEST
state: present
enabled: no
normal_traffic_allowed: yes
sampling_rate: 1
session_type: remoteMirrorDest
switch: "DVS-LT"
destination_vm:
name: TEST_VM
nic_label: "Network adapter 1"
EXPECTED RESULTS
Running this should produce a port mirror on the identified switch, running this subsequent times with no changes should not create additional identically named rules. I would also like to know how it would be possible to add multiple destination_vm's
ACTUAL RESULTS
Another identically named rule is configured every subsequent run.
SUMMARY
When attempting to create a new vspan session subsequent runs will create an identically named rule, End goal for me personally was to allow multiple destination_vms to be defined but this does not appear to be possible currently.
ISSUE TYPE
COMPONENT NAME
community.vmware.vmware_vspan_session
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
ESXi version 6.7
STEPS TO REPRODUCE
Run the below playbook with the requirements of this collection installed. Requires a DVS and a VM with the correct nic label within the targeted vcenter.
EXPECTED RESULTS
Running this should produce a port mirror on the identified switch, running this subsequent times with no changes should not create additional identically named rules. I would also like to know how it would be possible to add multiple destination_vm's
ACTUAL RESULTS
Another identically named rule is configured every subsequent run.