Skip to content

Commit

Permalink
Fix lldp interface issue
Browse files Browse the repository at this point in the history
  • Loading branch information
roverflow committed Feb 16, 2025
1 parent 4440610 commit 4fe040d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
---
- name: Populate configuration
vars:
- name: Configure GigabitEthernet1
cisco.ios.ios_config:
lines:
"interface GigabitEthernet 1\nlldp receive\nlldp transmit\ninterface GigabitEthernet 2\nlldp receive\nlldp transmit\ninterface GigabitEthernet 3\n\
lldp receive\nlldp transmit\n"
ansible.netcommon.cli_config:
config: "{{ lines }}"
- lldp receive
- lldp transmit
parents:
- interface GigabitEthernet1

- name: Configure GigabitEthernet2
cisco.ios.ios_config:
lines:
- lldp receive
- lldp transmit
parents:
- interface GigabitEthernet2

- name: Configure GigabitEthernet3
cisco.ios.ios_config:
lines:
- lldp receive
- lldp transmit
parents:
- interface GigabitEthernet3

- name: Negate GigabitEthernet 4 lldp receive and transmit if merged
vars:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- ansible.builtin.include_tasks: _enable_lldp.yaml
- ansible.builtin.include_tasks: _remove_config.yaml
- ansible.builtin.include_tasks: _populate_config.yaml
vars:
isMerged: true

- block:
- name: Gather the provided configuration with the existing running configuration
Expand Down

0 comments on commit 4fe040d

Please sign in to comment.