Issue 1:
From @michaelgaribaldi on 2016-10-28T22:32:33Z

ISSUE TYPE

Bug Report

COMPONENT NAME

eos_config

ANSIBLE VERSION

ansible 2.3.0
config file = /home/vagrant/iostest/ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

Using default config

OS / ENVIRONMENT

Ubuntu managing Arista

SUMMARY

In this special case when multiple VLANS are created without a name (or the same name) associated to them, the "show run" of an Arista config puts them in one line such as "vlan 10-11". This breaks the idempotency since it will attempt to add the VLAN again. It will attempt to add VLAN 10 or 11 again, for example. It appears as though during the running config check, the module is parsing for an individual VLAN line with that particualr VLAN.

STEPS TO REPRODUCE

Create a task that adds a NEW vlan to an arista switch. Do not add a name to this vlan at this time.

Run the task again but change make vlan 11 instead of vlan 10

Run the exact task in step 1...adding vlan 10 to the switch again

#eos.yaml
- name: role add vlan using eos_config module
connection: local
eos_config:
lines:
- vlan 10
provider: "{{ cli }}"
register: vlan_created_out

#arista-vlan.yaml

---
- name: playbook - vlan add using eos_config
hosts: eos
gather_facts: no
connection: local

vars_files:
- creds.yaml

roles:
- { role: vlan_add }

EXPECTED RESULTS

Step 1) Expected output, changed=1 and new vlan 10 created

Step 2) Expected output, changed=1 and new vlan 11 created

Step 3) Expected output, changed=0 and vlan 10 not attempted to be created

ACTUAL RESULTS

Step 1) Expected output, changed=1 and new vlan 10 created

Step 2) Expected output, changed=1 and new vlan 11 created

Step 3) Expected output, changed=1 and vlan 10 attempted to be created again...you can see when logging AAA commands that the vlan is attempting to be created every time.

Copied from original issue: ansible/ansible-modules-core#5430

Issue 2:
From @michaelgaribaldi on 2016-10-28T22:32:33Z

ISSUE TYPE

Bug Report

COMPONENT NAME

eos_config

ANSIBLE VERSION

ansible 2.3.0
config file = /home/vagrant/iostest/ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

Using default config

OS / ENVIRONMENT

Ubuntu managing Arista

SUMMARY

In this special case when multiple VLANS are created without a name (or the same name) associated to them, the "show run" of an Arista config puts them in one line such as "vlan 10-11". This breaks the idempotency since it will attempt to add the VLAN again. It will attempt to add VLAN 10 or 11 again, for example. It appears as though during the running config check, the module is parsing for an individual VLAN line with that particualr VLAN.

STEPS TO REPRODUCE

Create a task that adds a NEW vlan to an arista switch. Do not add a name to this vlan at this time.

Run the task again but change make vlan 11 instead of vlan 10

Run the exact task in step 1...adding vlan 10 to the switch again

#eos.yaml
- name: role add vlan using eos_config module
connection: local
eos_config:
lines:
- vlan 10
provider: "{{ cli }}"
register: vlan_created_out

#arista-vlan.yaml

---
- name: playbook - vlan add using eos_config
hosts: eos
gather_facts: no
connection: local

vars_files:
- creds.yaml

roles:
- { role: vlan_add }

EXPECTED RESULTS

Step 1) Expected output, changed=1 and new vlan 10 created

Step 2) Expected output, changed=1 and new vlan 11 created

Step 3) Expected output, changed=0 and vlan 10 not attempted to be created

ACTUAL RESULTS

Step 1) Expected output, changed=1 and new vlan 10 created

Step 2) Expected output, changed=1 and new vlan 11 created

Step 3) Expected output, changed=1 and vlan 10 attempted to be created again...you can see when logging AAA commands that the vlan is attempting to be created every time.

Copied from original issue: ansible/ansible-modules-core#5430