mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix eapi tests to use become (#40838)
* Return the expected prompt character based on become status * Update eos_banner tests for eapi * Update eos_config tests for eapi * Update eos_facts tests for eapi * Update eos_interface tests for eapi * Update eos_l3_interface tests for eapi * Update eos_lldp tests for eapi * Update eos_logging tests for eapi * Update eos_smoke tests for eapi * Update eos_system tests for eapi
This commit is contained in:
parent
669949e6a3
commit
20f93816d6
59 changed files with 217 additions and 490 deletions
|
@ -45,8 +45,11 @@ class HttpApi:
|
||||||
return results
|
return results
|
||||||
|
|
||||||
def get_prompt(self):
|
def get_prompt(self):
|
||||||
# Hack to keep @enable_mode working
|
# Fake a prompt for @enable_mode
|
||||||
return '#'
|
if self._become:
|
||||||
|
return '#'
|
||||||
|
else:
|
||||||
|
return '>'
|
||||||
|
|
||||||
def set_become(self, play_context):
|
def set_become(self, play_context):
|
||||||
self._become = play_context.become
|
self._become = play_context.become
|
||||||
|
|
|
@ -4,19 +4,15 @@
|
||||||
- name: Remove previous login banner
|
- name: Remove previous login banner
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner login
|
lines: no banner login
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Create login banner
|
- name: Create login banner
|
||||||
eos_banner:
|
eos_banner: &multiline
|
||||||
banner: login
|
banner: login
|
||||||
text: |
|
text: |
|
||||||
Junk login banner
|
Junk login banner
|
||||||
over multiple lines
|
over multiple lines
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -28,14 +24,7 @@
|
||||||
- "'ansible_1' in result.session_name"
|
- "'ansible_1' in result.session_name"
|
||||||
|
|
||||||
- name: Create login banner again (idempotent)
|
- name: Create login banner again (idempotent)
|
||||||
eos_banner:
|
eos_banner: *multiline
|
||||||
banner: login
|
|
||||||
text: |
|
|
||||||
Junk login banner
|
|
||||||
over multiple lines
|
|
||||||
state: present
|
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -47,11 +36,9 @@
|
||||||
- "result.session_name is not defined"
|
- "result.session_name is not defined"
|
||||||
|
|
||||||
- name: Remove login
|
- name: Remove login
|
||||||
eos_banner:
|
eos_banner: &remove
|
||||||
banner: login
|
banner: login
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -63,11 +50,7 @@
|
||||||
- "'ansible_1' in result.session_name"
|
- "'ansible_1' in result.session_name"
|
||||||
|
|
||||||
- name: Remove login again (idempotent)
|
- name: Remove login again (idempotent)
|
||||||
eos_banner:
|
eos_banner: *remove
|
||||||
banner: login
|
|
||||||
state: absent
|
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
- name: Remove previous motd banner
|
- name: Remove previous motd banner
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner motd
|
lines: no banner motd
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Create motd
|
- name: Set motd
|
||||||
eos_banner:
|
eos_banner:
|
||||||
banner: motd
|
banner: motd
|
||||||
text: |
|
text: |
|
||||||
|
@ -16,8 +14,6 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -29,7 +25,7 @@
|
||||||
# Ensure sessions contains epoc. Will fail after 18th May 2033
|
# Ensure sessions contains epoc. Will fail after 18th May 2033
|
||||||
- "'ansible_1' in result.session_name"
|
- "'ansible_1' in result.session_name"
|
||||||
|
|
||||||
- name: Create motd again (idempotent)
|
- name: Set motd again (idempotent)
|
||||||
eos_banner:
|
eos_banner:
|
||||||
banner: motd
|
banner: motd
|
||||||
text: |
|
text: |
|
||||||
|
@ -37,8 +33,6 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -57,8 +51,6 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -77,8 +69,6 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -7,18 +7,13 @@
|
||||||
- name: Remove previous motd banner (setup)
|
- name: Remove previous motd banner (setup)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner motd
|
lines: no banner motd
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
||||||
- name: create motd
|
- name: create motd
|
||||||
net_banner:
|
net_banner:
|
||||||
banner: motd
|
banner: motd
|
||||||
text: this is my motd banner configure by net_banner
|
text: this is my motd banner configure by net_banner
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -32,8 +27,6 @@
|
||||||
- name: Remove previous motd banner (teardown)
|
- name: Remove previous motd banner (teardown)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner motd
|
lines: no banner motd
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eos cli/net_banner.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END eos cli/net_banner.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -4,19 +4,17 @@
|
||||||
- name: Remove previous login banner
|
- name: Remove previous login banner
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner login
|
lines: no banner login
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- name: Create login banner
|
- name: Create login banner
|
||||||
eos_banner:
|
eos_banner: &multiline
|
||||||
banner: login
|
banner: login
|
||||||
text: |
|
text: |
|
||||||
this is my login banner
|
this is my login banner
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -27,15 +25,8 @@
|
||||||
- "'ansible_1' in result.session_name"
|
- "'ansible_1' in result.session_name"
|
||||||
|
|
||||||
- name: Create login banner again (idempotent)
|
- name: Create login banner again (idempotent)
|
||||||
eos_banner:
|
eos_banner: *multiline
|
||||||
banner: login
|
become: yes
|
||||||
text: |
|
|
||||||
this is my login banner
|
|
||||||
that has a multiline
|
|
||||||
string
|
|
||||||
state: present
|
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -46,15 +37,14 @@
|
||||||
- "result.session_name is not defined"
|
- "result.session_name is not defined"
|
||||||
|
|
||||||
- name: Remove login
|
- name: Remove login
|
||||||
eos_banner:
|
eos_banner: &remove
|
||||||
banner: login
|
banner: login
|
||||||
text: |
|
text: |
|
||||||
this is my login banner
|
this is my login banner
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -65,15 +55,8 @@
|
||||||
- "'ansible_1' in result.session_name"
|
- "'ansible_1' in result.session_name"
|
||||||
|
|
||||||
- name: Remove login again (idempotent)
|
- name: Remove login again (idempotent)
|
||||||
eos_banner:
|
eos_banner: *remove
|
||||||
banner: login
|
become: yes
|
||||||
text: |
|
|
||||||
this is my login banner
|
|
||||||
that has a multiline
|
|
||||||
string
|
|
||||||
state: absent
|
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
|
- debug: msg="START eapi/basic-motd.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- name: Remove previous motd banner
|
- name: Remove previous motd banner
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner motd
|
lines: no banner motd
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- name: Set motd
|
- name: Set motd
|
||||||
eos_banner:
|
eos_banner:
|
||||||
|
@ -14,8 +14,7 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,8 +33,7 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -53,8 +51,7 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -72,8 +69,7 @@
|
||||||
that has a multiline
|
that has a multiline
|
||||||
string
|
string
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -82,6 +78,7 @@
|
||||||
- "result.commands | length == 0"
|
- "result.commands | length == 0"
|
||||||
# Ensure sessions contains epoc. Will fail after 18th May 2033
|
# Ensure sessions contains epoc. Will fail after 18th May 2033
|
||||||
- "result.session_name is not defined"
|
- "result.session_name is not defined"
|
||||||
|
|
||||||
# FIXME add in tests for everything defined in docs
|
# FIXME add in tests for everything defined in docs
|
||||||
# FIXME Test state:absent + test:
|
# FIXME Test state:absent + test:
|
||||||
# FIXME Without powers ensure "privileged mode required"
|
# FIXME Without powers ensure "privileged mode required"
|
||||||
|
|
|
@ -7,16 +7,14 @@
|
||||||
- name: Remove previous motd banner (setup)
|
- name: Remove previous motd banner (setup)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner motd
|
lines: no banner motd
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- name: create motd
|
- name: create motd
|
||||||
net_banner:
|
net_banner:
|
||||||
banner: motd
|
banner: motd
|
||||||
text: this is my motd banner configure by net_banner
|
text: this is my motd banner configure by net_banner
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -29,7 +27,6 @@
|
||||||
- name: Remove previous motd banner (teardown)
|
- name: Remove previous motd banner (teardown)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no banner motd
|
lines: no banner motd
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- debug: msg="END eos eapi/net_banner.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END eos eapi/net_banner.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -13,23 +13,20 @@
|
||||||
|
|
||||||
|
|
||||||
- name: save config always
|
- name: save config always
|
||||||
eos_config:
|
eos_config: &always
|
||||||
save_when: always
|
save_when: always
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert: &changed
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
- name: save always again (not idempotent)
|
- name: save should always run
|
||||||
eos_config:
|
eos_config: *always
|
||||||
save_when: always
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert: *changed
|
||||||
that:
|
|
||||||
- "result.changed == true"
|
|
||||||
|
|
||||||
- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -37,5 +37,4 @@
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
||||||
- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/sublevel.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
- name: setup
|
- name: setup
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname veos01
|
lines: hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
- name: teardown
|
- name: teardown
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname veos01
|
lines: hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
- snmp-server contact ansible
|
- snmp-server contact ansible
|
||||||
- hostname veos01
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
- no snmp-server contact
|
- no snmp-server contact
|
||||||
- hostname veos01
|
- hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
- name: setup
|
- name: setup
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
- snmp-server contact ansible
|
- "snmp-server contact ansible"
|
||||||
- hostname veos01
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
- name: teardown
|
- name: teardown
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
- hostname veos01
|
|
||||||
- no snmp-server contact
|
- no snmp-server contact
|
||||||
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
match: none
|
match: none
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,13 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Ethernet2
|
- interface Ethernet2
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure device with defaults included
|
- name: configure device with defaults included
|
||||||
eos_config:
|
eos_config:
|
||||||
src: defaults/config.j2
|
src: defaults/config.j2
|
||||||
defaults: yes
|
defaults: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug: var=result
|
- debug: var=result
|
||||||
|
@ -27,6 +29,7 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
src: defaults/config.j2
|
src: defaults/config.j2
|
||||||
defaults: yes
|
defaults: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug: var=result
|
- debug: var=result
|
||||||
|
|
|
@ -9,24 +9,24 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Ethernet2
|
- interface Ethernet2
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
|
||||||
- name: save config
|
- name: save config always
|
||||||
eos_config:
|
eos_config: &always
|
||||||
save_when: always
|
save_when: always
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert: &changed
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
- name: save should always run
|
- name: save should always run
|
||||||
eos_config:
|
eos_config: *always
|
||||||
save_when: always
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert: *changed
|
||||||
that:
|
|
||||||
- "result.changed == true"
|
|
||||||
|
|
||||||
- debug: msg="END eapi/save.yaml"
|
- debug: msg="END eapi/save.yaml"
|
||||||
|
|
|
@ -9,10 +9,12 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Ethernet2
|
- interface Ethernet2
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure device with config
|
- name: configure device with config
|
||||||
eos_config:
|
eos_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -24,6 +26,7 @@
|
||||||
- name: check device with config
|
- name: check device with config
|
||||||
eos_config:
|
eos_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -9,11 +9,13 @@
|
||||||
parents:
|
parents:
|
||||||
- interface Ethernet2
|
- interface Ethernet2
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure device with config
|
- name: configure device with config
|
||||||
eos_config:
|
eos_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -25,6 +27,7 @@
|
||||||
- name: check device with config
|
- name: check device with config
|
||||||
eos_config:
|
eos_config:
|
||||||
src: basic/config.j2
|
src: basic/config.j2
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure sub level command
|
- name: configure sub level command
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: 10 permit ip any any log
|
lines: 10 permit ip any any log
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
after: exit
|
after: exit
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -23,6 +25,7 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: 10 permit ip any any log
|
lines: 10 permit ip any any log
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -33,5 +36,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/sublevel.yaml"
|
- debug: msg="END eapi/sublevel.yaml"
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
before: no ip access-list test
|
before: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure sub level command using block resplace
|
- name: configure sub level command using block resplace
|
||||||
eos_config:
|
eos_config:
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
after: end
|
after: end
|
||||||
replace: block
|
replace: block
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -41,6 +43,7 @@
|
||||||
- 40 permit ip host 4.4.4.4 any log
|
- 40 permit ip host 4.4.4.4 any log
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
replace: block
|
replace: block
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -51,5 +54,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/sublevel_block.yaml"
|
- debug: msg="END eapi/sublevel_block.yaml"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
before: no ip access-list test
|
before: no ip access-list test
|
||||||
after: exit
|
after: exit
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure sub level command using exact match
|
- name: configure sub level command using exact match
|
||||||
eos_config:
|
eos_config:
|
||||||
|
@ -21,10 +22,11 @@
|
||||||
- 20 permit ip host 2.2.2.2 any log
|
- 20 permit ip host 2.2.2.2 any log
|
||||||
- 30 permit ip host 3.3.3.3 any log
|
- 30 permit ip host 3.3.3.3 any log
|
||||||
- 40 permit ip host 4.4.4.4 any log
|
- 40 permit ip host 4.4.4.4 any log
|
||||||
before: no ip access-list test
|
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
|
before: no ip access-list test
|
||||||
after: exit
|
after: exit
|
||||||
match: exact
|
match: exact
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -47,6 +49,7 @@
|
||||||
before: no ip access-list test
|
before: no ip access-list test
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
match: exact
|
match: exact
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -57,5 +60,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/sublevel_exact.yaml"
|
- debug: msg="END eapi/sublevel_exact.yaml"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
before: no ip access-list test
|
before: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure sub level command using strict match
|
- name: configure sub level command using strict match
|
||||||
eos_config:
|
eos_config:
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
after: exit
|
after: exit
|
||||||
match: strict
|
match: strict
|
||||||
replace: block
|
replace: block
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -46,6 +48,7 @@
|
||||||
- 40 permit ip host 4.4.4.4 any log
|
- 40 permit ip host 4.4.4.4 any log
|
||||||
parents: ip access-list test
|
parents: ip access-list test
|
||||||
match: strict
|
match: strict
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -56,5 +59,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/sublevel_strict.yaml"
|
- debug: msg="END eapi/sublevel_strict.yaml"
|
||||||
|
|
|
@ -5,10 +5,12 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname {{ inventory_hostname_short }}
|
lines: hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure top level command
|
- name: configure top level command
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -19,6 +21,7 @@
|
||||||
- name: configure top level command idempotent check
|
- name: configure top level command idempotent check
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -29,5 +32,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname {{ inventory_hostname_short }}
|
lines: hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/toplevel.yaml"
|
- debug: msg="END eapi/toplevel.yaml"
|
||||||
|
|
|
@ -4,14 +4,16 @@
|
||||||
- name: setup
|
- name: setup
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
- "snmp-server contact ansible"
|
- snmp-server contact ansible
|
||||||
- "hostname {{ inventory_hostname_short }}"
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure top level command with before
|
- name: configure top level command with before
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
after: snmp-server contact bar
|
after: snmp-server contact bar
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -24,6 +26,7 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
after: snmp-server contact foo
|
after: snmp-server contact foo
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -36,5 +39,6 @@
|
||||||
- no snmp-server contact
|
- no snmp-server contact
|
||||||
- hostname {{ inventory_hostname_short }}
|
- hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/toplevel_after.yaml"
|
- debug: msg="END eapi/toplevel_after.yaml"
|
||||||
|
|
|
@ -7,11 +7,13 @@
|
||||||
- "snmp-server contact ansible"
|
- "snmp-server contact ansible"
|
||||||
- "hostname {{ inventory_hostname_short }}"
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure top level command with before
|
- name: configure top level command with before
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
before: snmp-server contact bar
|
before: snmp-server contact bar
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -24,6 +26,7 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
before: snmp-server contact foo
|
before: snmp-server contact foo
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -33,8 +36,9 @@
|
||||||
- name: teardown
|
- name: teardown
|
||||||
eos_config:
|
eos_config:
|
||||||
lines:
|
lines:
|
||||||
- no snmp-server contact ansible
|
- no snmp-server contact
|
||||||
- hostname {{ inventory_hostname_short }}
|
- "hostname {{ inventory_hostname_short }}"
|
||||||
match: none
|
match: none
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/toplevel_before.yaml"
|
- debug: msg="END eapi/toplevel_before.yaml"
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
# _facts modules should never report a change
|
# _facts modules should never report a change
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- debug: msg="START cli/not_hardware_facts.yaml on connection={{ ansible_connection }}"
|
- debug: msg="START cli/not_hardware.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
|
||||||
- name: test not hardware
|
- name: test not hardware
|
||||||
|
@ -27,4 +27,4 @@
|
||||||
# ... and not present
|
# ... and not present
|
||||||
- "result.ansible_facts.ansible_net_filesystems is not defined"
|
- "result.ansible_facts.ansible_net_filesystems is not defined"
|
||||||
|
|
||||||
- debug: msg="END cli/not_hardware_facts.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/not_hardware.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
- name: Make sure LLDP is running (setup)
|
- name: Make sure LLDP is running (setup)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: lldp run
|
lines: lldp run
|
||||||
authorize: yes
|
become: yes
|
||||||
|
|
||||||
- name: test getting all facts
|
- name: test getting all facts
|
||||||
eos_facts:
|
eos_facts:
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- all
|
- all
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -29,9 +30,4 @@
|
||||||
- "result.ansible_facts.ansible_net_memfree_mb > 1"
|
- "result.ansible_facts.ansible_net_memfree_mb > 1"
|
||||||
- "result.ansible_facts.ansible_net_memtotal_mb > 1"
|
- "result.ansible_facts.ansible_net_memtotal_mb > 1"
|
||||||
|
|
||||||
- name: Make sure LLDP is running (teardown)
|
|
||||||
eos_config:
|
|
||||||
lines: no lldp run
|
|
||||||
authorize: yes
|
|
||||||
|
|
||||||
- debug: msg="END eapi/all_facts.yaml"
|
- debug: msg="END eapi/all_facts.yaml"
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
- name: Make sure LLDP is running (setup)
|
- name: Make sure LLDP is running (setup)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: lldp run
|
lines: lldp run
|
||||||
authorize: yes
|
become: yes
|
||||||
|
|
||||||
- name: test getting default facts
|
- name: test getting default facts
|
||||||
eos_facts:
|
eos_facts:
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -31,9 +32,4 @@
|
||||||
# ... and not present
|
# ... and not present
|
||||||
- "result.ansible_facts.ansible_net_config is not defined" # config
|
- "result.ansible_facts.ansible_net_config is not defined" # config
|
||||||
|
|
||||||
- name: Make sure LLDP is running (setup)
|
|
||||||
eos_config:
|
|
||||||
lines: lldp run
|
|
||||||
authorize: yes
|
|
||||||
|
|
||||||
- debug: msg="END eapi/default.yaml"
|
- debug: msg="END eapi/default.yaml"
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
---
|
---
|
||||||
- debug: msg="START eapi/not_hardware_facts.yaml"
|
- debug: msg="START eapi/not_hardware.yaml"
|
||||||
|
|
||||||
- name: Make sure LLDP is running (setup)
|
- name: Make sure LLDP is running (setup)
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: lldp run
|
lines: lldp run
|
||||||
authorize: yes
|
become: yes
|
||||||
|
|
||||||
- name: test not hardware
|
- name: test not hardware
|
||||||
eos_facts:
|
eos_facts:
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- "!hardware"
|
- "!hardware"
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -30,9 +31,4 @@
|
||||||
# ... and not present
|
# ... and not present
|
||||||
- "result.ansible_facts.ansible_net_filesystems is not defined"
|
- "result.ansible_facts.ansible_net_filesystems is not defined"
|
||||||
|
|
||||||
- name: Make sure LLDP is running (teardown)
|
- debug: msg="END eapi/not_hardware.yaml"
|
||||||
eos_config:
|
|
||||||
lines: no lldp run
|
|
||||||
authorize: yes
|
|
||||||
|
|
||||||
- debug: msg="END eapi/not_hardware_facts.yaml"
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
description: test-interface-1
|
description: test-interface-1
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -22,8 +20,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -38,8 +34,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -53,8 +47,6 @@
|
||||||
description: test-interface
|
description: test-interface
|
||||||
mtu: 2000
|
mtu: 2000
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -71,8 +63,6 @@
|
||||||
description: test-interface-1
|
description: test-interface-1
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -87,8 +77,6 @@
|
||||||
eos_interface:
|
eos_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: False
|
enabled: False
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -102,8 +90,6 @@
|
||||||
eos_interface:
|
eos_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: True
|
enabled: True
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -119,8 +105,6 @@
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -130,8 +114,6 @@
|
||||||
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
||||||
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -150,8 +132,6 @@
|
||||||
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
||||||
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -166,8 +146,6 @@
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
enabled: False
|
enabled: False
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -186,8 +164,6 @@
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
enabled: True
|
enabled: True
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -205,8 +181,6 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Create loopback interface aggregate
|
- name: Create loopback interface aggregate
|
||||||
|
@ -215,8 +189,6 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -232,8 +204,6 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -249,8 +219,6 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
tx_rate: ge(0)
|
tx_rate: ge(0)
|
||||||
rx_rate: ge(0)
|
rx_rate: ge(0)
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -27,8 +26,6 @@
|
||||||
state: down
|
state: down
|
||||||
tx_rate: gt(0)
|
tx_rate: gt(0)
|
||||||
rx_rate: lt(0)
|
rx_rate: lt(0)
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
@ -45,8 +42,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: False
|
enabled: False
|
||||||
state: down
|
state: down
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -58,9 +53,7 @@
|
||||||
eos_interface:
|
eos_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: False
|
enabled: False
|
||||||
authorize: yes
|
|
||||||
state: up
|
state: up
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
@ -74,8 +67,6 @@
|
||||||
eos_command:
|
eos_command:
|
||||||
commands:
|
commands:
|
||||||
- show lldp neighbors management1
|
- show lldp neighbors management1
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: show_lldp_neighbors_result
|
register: show_lldp_neighbors_result
|
||||||
|
|
||||||
|
@ -86,8 +77,6 @@
|
||||||
neighbors:
|
neighbors:
|
||||||
- port: eth0
|
- port: eth0
|
||||||
host: an-vyos-02
|
host: an-vyos-02
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -101,8 +90,6 @@
|
||||||
neighbors:
|
neighbors:
|
||||||
- port: dummy_port
|
- port: dummy_port
|
||||||
host: dummy_host
|
host: dummy_host
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
@ -120,8 +107,6 @@
|
||||||
- name: "{{ test_interface_1 }}"
|
- name: "{{ test_interface_1 }}"
|
||||||
enabled: True
|
enabled: True
|
||||||
state: up
|
state: up
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
@ -138,8 +123,6 @@
|
||||||
neighbors:
|
neighbors:
|
||||||
- port: eth0
|
- port: eth0
|
||||||
host: an-vyos-02
|
host: an-vyos-02
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
@ -157,8 +140,6 @@
|
||||||
host: an-vyos-02
|
host: an-vyos-02
|
||||||
- port: dummy_port
|
- port: dummy_port
|
||||||
host: dummy_host
|
host: dummy_host
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
description: test-interface-1
|
description: test-interface-1
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -24,8 +22,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -41,8 +37,6 @@
|
||||||
description: test-interface
|
description: test-interface
|
||||||
mtu: 2000
|
mtu: 2000
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
description: test-interface-1
|
description: test-interface-1
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Configure interface
|
- name: Configure interface
|
||||||
|
@ -21,8 +20,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -36,8 +34,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -50,8 +47,7 @@
|
||||||
description: test-interface
|
description: test-interface
|
||||||
mtu: 2000
|
mtu: 2000
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -67,8 +63,7 @@
|
||||||
description: test-interface-1
|
description: test-interface-1
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -82,8 +77,7 @@
|
||||||
eos_interface:
|
eos_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: False
|
enabled: False
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -96,8 +90,7 @@
|
||||||
eos_interface:
|
eos_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: True
|
enabled: True
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -112,8 +105,7 @@
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Add interface aggregate
|
- name: Add interface aggregate
|
||||||
|
@ -122,8 +114,7 @@
|
||||||
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
||||||
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -141,8 +132,7 @@
|
||||||
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
- { name: "{{ test_interface_1 }}", mtu: 2000, description: test-interface-1 }
|
||||||
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
- { name: "{{ test_interface_2 }}", mtu: 2000, description: test-interface-2 }
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -156,8 +146,7 @@
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
enabled: False
|
enabled: False
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -175,8 +164,7 @@
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
enabled: True
|
enabled: True
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -193,8 +181,7 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- name: Create loopback interface aggregate
|
- name: Create loopback interface aggregate
|
||||||
eos_interface:
|
eos_interface:
|
||||||
|
@ -202,8 +189,7 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -218,8 +204,7 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -234,8 +219,7 @@
|
||||||
- name: loopback9
|
- name: loopback9
|
||||||
- name: loopback10
|
- name: loopback10
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
- name: Make sure LLDP is running
|
- name: Make sure LLDP is running
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: lldp run
|
lines: lldp run
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Check intent arguments
|
- name: Check intent arguments
|
||||||
|
@ -20,7 +18,7 @@
|
||||||
tx_rate: ge(0)
|
tx_rate: ge(0)
|
||||||
rx_rate: ge(0)
|
rx_rate: ge(0)
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -33,9 +31,8 @@
|
||||||
state: down
|
state: down
|
||||||
tx_rate: gt(0)
|
tx_rate: gt(0)
|
||||||
rx_rate: lt(0)
|
rx_rate: lt(0)
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -50,8 +47,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: False
|
enabled: False
|
||||||
state: down
|
state: down
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -62,10 +58,9 @@
|
||||||
eos_interface:
|
eos_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
enabled: False
|
enabled: False
|
||||||
authorize: yes
|
|
||||||
state: up
|
state: up
|
||||||
provider: "{{ eapi }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -77,8 +72,7 @@
|
||||||
eos_command:
|
eos_command:
|
||||||
commands:
|
commands:
|
||||||
- show lldp neighbors management1
|
- show lldp neighbors management1
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: show_lldp_neighbors_result
|
register: show_lldp_neighbors_result
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
@ -88,8 +82,7 @@
|
||||||
neighbors:
|
neighbors:
|
||||||
- port: eth0
|
- port: eth0
|
||||||
host: an-vyos-02
|
host: an-vyos-02
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -102,9 +95,8 @@
|
||||||
neighbors:
|
neighbors:
|
||||||
- port: dummy_port
|
- port: dummy_port
|
||||||
host: dummy_host
|
host: dummy_host
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -120,9 +112,8 @@
|
||||||
- name: "{{ test_interface_1 }}"
|
- name: "{{ test_interface_1 }}"
|
||||||
enabled: True
|
enabled: True
|
||||||
state: up
|
state: up
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -137,9 +128,8 @@
|
||||||
neighbors:
|
neighbors:
|
||||||
- port: eth0
|
- port: eth0
|
||||||
host: an-vyos-02
|
host: an-vyos-02
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -155,9 +145,8 @@
|
||||||
host: an-vyos-02
|
host: an-vyos-02
|
||||||
- port: dummy_port
|
- port: dummy_port
|
||||||
host: dummy_host
|
host: dummy_host
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -166,9 +155,3 @@
|
||||||
- "'host dummy_host' in result.failed_conditions"
|
- "'host dummy_host' in result.failed_conditions"
|
||||||
- "'port dummy_port' in result.failed_conditions"
|
- "'port dummy_port' in result.failed_conditions"
|
||||||
when: "'an-vyos-02' in show_lldp_neighbors_result.stdout[0]"
|
when: "'an-vyos-02' in show_lldp_neighbors_result.stdout[0]"
|
||||||
|
|
||||||
- name: Make sure LLDP is running (teardown)
|
|
||||||
eos_config:
|
|
||||||
lines: no lldp run
|
|
||||||
authorize: yes
|
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
description: test-interface-1
|
description: test-interface-1
|
||||||
mtu: 1800
|
mtu: 1800
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Configure interface description using platform agnostic module
|
- name: Configure interface description using platform agnostic module
|
||||||
|
@ -23,8 +22,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
description: test-interface-initial
|
description: test-interface-initial
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -39,8 +37,7 @@
|
||||||
description: test-interface
|
description: test-interface
|
||||||
mtu: 2000
|
mtu: 2000
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -20,8 +18,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 192.108.1.1/24
|
ipv4: 192.108.1.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -36,8 +32,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 192.108.1.1/24
|
ipv4: 192.108.1.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -50,8 +44,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 197.108.0.1/24
|
ipv4: 197.108.0.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -66,8 +58,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv6: fd5d:12c9:2201:1::1/64
|
ipv6: fd5d:12c9:2201:1::1/64
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -82,8 +72,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv6: fd5d:12c9:2201:1::1/64
|
ipv6: fd5d:12c9:2201:1::1/64
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -96,8 +84,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv6: fd58:12c9:2201:1::1/64
|
ipv6: fd58:12c9:2201:1::1/64
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -111,8 +97,6 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -127,8 +111,6 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -136,8 +118,6 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_2 }}"
|
name: "{{ test_interface_2 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -146,8 +126,6 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { name: "{{ test_interface_1 }}", ipv4: 192.108.1.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
- { name: "{{ test_interface_1 }}", ipv4: 192.108.1.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
||||||
- { name: "{{ test_interface_2 }}", ipv4: 192.109.1.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
- { name: "{{ test_interface_2 }}", ipv4: 192.109.1.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -166,8 +144,6 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { name: "{{ test_interface_1 }}", ipv4: 192.108.1.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
- { name: "{{ test_interface_1 }}", ipv4: 192.108.1.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
||||||
- { name: "{{ test_interface_2 }}", ipv4: 192.109.1.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
- { name: "{{ test_interface_2 }}", ipv4: 192.109.1.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -180,8 +156,6 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { name: "{{ test_interface_1 }}", ipv4: 193.118.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
|
- { name: "{{ test_interface_1 }}", ipv4: 193.118.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
|
||||||
- { name: "{{ test_interface_2 }}", ipv4: 192.119.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
|
- { name: "{{ test_interface_2 }}", ipv4: 192.119.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -202,8 +176,6 @@
|
||||||
- { name: "{{ test_interface_1 }}" }
|
- { name: "{{ test_interface_1 }}" }
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -223,8 +195,6 @@
|
||||||
- { name: "{{ test_interface_1 }}" }
|
- { name: "{{ test_interface_1 }}" }
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
net_l3_interface:
|
net_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -22,8 +20,6 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 192.108.0.1/24
|
ipv4: 192.108.0.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -37,8 +33,6 @@
|
||||||
net_l3_interface:
|
net_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Configure interface ipv4 address
|
- name: Configure interface ipv4 address
|
||||||
|
@ -19,8 +18,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 192.168.1.1/24
|
ipv4: 192.168.1.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,8 +32,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 192.168.1.1/24
|
ipv4: 192.168.1.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -47,8 +44,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 197.168.0.1/24
|
ipv4: 197.168.0.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -62,8 +58,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv6: fd5d:12c9:2201:1::1/64
|
ipv6: fd5d:12c9:2201:1::1/64
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -77,8 +72,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv6: fd5d:12c9:2201:1::1/64
|
ipv6: fd5d:12c9:2201:1::1/64
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -90,8 +84,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv6: fd58:12c9:2201:1::1/64
|
ipv6: fd58:12c9:2201:1::1/64
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -104,8 +97,7 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -119,16 +111,14 @@
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Delete second interface ipv4 and ipv6 address (setup)
|
- name: Delete second interface ipv4 and ipv6 address (setup)
|
||||||
eos_l3_interface:
|
eos_l3_interface:
|
||||||
name: "{{ test_interface_2 }}"
|
name: "{{ test_interface_2 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Configure ipv4 and ipv6 address using aggregate
|
- name: Configure ipv4 and ipv6 address using aggregate
|
||||||
|
@ -136,8 +126,7 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { name: "{{ test_interface_1 }}", ipv4: 192.161.0.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
- { name: "{{ test_interface_1 }}", ipv4: 192.161.0.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
||||||
- { name: "{{ test_interface_2 }}", ipv4: 192.162.0.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
- { name: "{{ test_interface_2 }}", ipv4: 192.162.0.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -155,8 +144,7 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { name: "{{ test_interface_1 }}", ipv4: 192.161.0.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
- { name: "{{ test_interface_1 }}", ipv4: 192.161.0.1/24, ipv6: "fd5d:12c9:2201:2::2/64" }
|
||||||
- { name: "{{ test_interface_2 }}", ipv4: 192.162.0.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
- { name: "{{ test_interface_2 }}", ipv4: 192.162.0.2/16, ipv6: "fd5e:12c9:2201:3::3/32" }
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -168,8 +156,7 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { name: "{{ test_interface_1 }}", ipv4: 193.167.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
|
- { name: "{{ test_interface_1 }}", ipv4: 193.167.1.1/8, ipv6: "fd5a:12c9:2201:4::4/32" }
|
||||||
- { name: "{{ test_interface_2 }}", ipv4: 192.169.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
|
- { name: "{{ test_interface_2 }}", ipv4: 192.169.2.2/24, ipv6: "fd5b:12c9:2201:5::5/90" }
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -189,8 +176,7 @@
|
||||||
- { name: "{{ test_interface_1 }}" }
|
- { name: "{{ test_interface_1 }}" }
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -209,8 +195,7 @@
|
||||||
- { name: "{{ test_interface_1 }}" }
|
- { name: "{{ test_interface_1 }}" }
|
||||||
- { name: "{{ test_interface_2 }}" }
|
- { name: "{{ test_interface_2 }}" }
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
net_l3_interface:
|
net_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Configure interface ipv4 address using platform agnostic module
|
- name: Configure interface ipv4 address using platform agnostic module
|
||||||
|
@ -21,8 +20,7 @@
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
ipv4: 192.108.0.1/24
|
ipv4: 192.108.0.1/24
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -35,8 +33,7 @@
|
||||||
net_l3_interface:
|
net_l3_interface:
|
||||||
name: "{{ test_interface_1 }}"
|
name: "{{ test_interface_1 }}"
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug: msg="END eos eapi/net_l3_interface.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END eos eapi/net_l3_interface.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -4,15 +4,11 @@
|
||||||
- name: Make sure LLDP is not running before tests
|
- name: Make sure LLDP is not running before tests
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no lldp run
|
lines: no lldp run
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Enable LLDP service
|
- name: Enable LLDP service
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -24,8 +20,6 @@
|
||||||
- name: Enable LLDP service again (idempotent)
|
- name: Enable LLDP service again (idempotent)
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -36,8 +30,6 @@
|
||||||
- name: Disable LLDP service
|
- name: Disable LLDP service
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -49,8 +41,6 @@
|
||||||
- name: Disable LLDP service (idempotent)
|
- name: Disable LLDP service (idempotent)
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
register: result
|
register: result
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,12 @@
|
||||||
- name: Make sure LLDP is not running before tests
|
- name: Make sure LLDP is not running before tests
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no lldp run
|
lines: no lldp run
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- name: Enable LLDP service
|
- name: Enable LLDP service
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -22,8 +20,7 @@
|
||||||
- name: Enable LLDP service again (idempotent)
|
- name: Enable LLDP service again (idempotent)
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -33,8 +30,7 @@
|
||||||
- name: Disable LLDP service
|
- name: Disable LLDP service
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -45,8 +41,7 @@
|
||||||
- name: Disable LLDP service (idempotent)
|
- name: Disable LLDP service (idempotent)
|
||||||
eos_lldp:
|
eos_lldp:
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -21,8 +19,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -35,8 +31,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -50,8 +44,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -64,8 +56,6 @@
|
||||||
dest: console
|
dest: console
|
||||||
level: warnings
|
level: warnings
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -78,8 +68,6 @@
|
||||||
eos_logging:
|
eos_logging:
|
||||||
dest: buffered
|
dest: buffered
|
||||||
size: 480000
|
size: 480000
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -93,8 +81,6 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { dest: console, level: warnings, state: absent }
|
- { dest: console, level: warnings, state: absent }
|
||||||
- { dest: buffered, size: 480000, state: absent }
|
- { dest: buffered, size: 480000, state: absent }
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -19,8 +17,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -34,8 +30,6 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
|
- debug: msg="START eapi/basic.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
- name: Set up host logging
|
- name: Set up host logging
|
||||||
eos_logging:
|
eos_logging:
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -18,8 +19,7 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -31,8 +31,7 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -45,8 +44,7 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -58,8 +56,7 @@
|
||||||
dest: console
|
dest: console
|
||||||
level: warnings
|
level: warnings
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -71,8 +68,7 @@
|
||||||
eos_logging:
|
eos_logging:
|
||||||
dest: buffered
|
dest: buffered
|
||||||
size: 480000
|
size: 480000
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -85,8 +81,7 @@
|
||||||
aggregate:
|
aggregate:
|
||||||
- { dest: console, level: warnings, state: absent }
|
- { dest: console, level: warnings, state: absent }
|
||||||
- { dest: buffered, size: 480000, state: absent }
|
- { dest: buffered, size: 480000, state: absent }
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Set up host logging using platform agnostic module
|
- name: Set up host logging using platform agnostic module
|
||||||
|
@ -18,8 +17,7 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: present
|
state: present
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -32,8 +30,7 @@
|
||||||
dest: host
|
dest: host
|
||||||
name: 172.16.0.1
|
name: 172.16.0.1
|
||||||
state: absent
|
state: absent
|
||||||
authorize: yes
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- debug: msg="END eos eapi/net_logging.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END eos eapi/net_logging.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
|
|
||||||
- debug: msg="END cli/common_utils.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/common_utils.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
|
||||||
# hit conditional()
|
# hit conditional()
|
||||||
- name: Set test interface
|
- name: Set test interface
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
lines: hostname {{ inventory_hostname_short }}
|
lines: hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: get current running-config
|
- name: get current running-config
|
||||||
eos_command:
|
eos_command:
|
||||||
commands: show running-config
|
commands: show running-config
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
register: config
|
register: config
|
||||||
|
|
||||||
- name: configure hostname
|
- name: configure hostname
|
||||||
|
@ -20,6 +22,7 @@
|
||||||
lines: hostname foo
|
lines: hostname foo
|
||||||
config: "{{ config.stdout[0] }}"
|
config: "{{ config.stdout[0] }}"
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -31,6 +34,7 @@
|
||||||
eos_command:
|
eos_command:
|
||||||
commands: show running-config
|
commands: show running-config
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
register: config
|
register: config
|
||||||
|
|
||||||
- name: teardown
|
- name: teardown
|
||||||
|
@ -38,6 +42,7 @@
|
||||||
lines: hostname {{ inventory_hostname_short }}
|
lines: hostname {{ inventory_hostname_short }}
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
# hit block and diffs
|
# hit block and diffs
|
||||||
- block:
|
- block:
|
||||||
|
@ -52,6 +57,7 @@
|
||||||
after: exit
|
after: exit
|
||||||
match: strict
|
match: strict
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure sub level command using block replace
|
- name: configure sub level command using block replace
|
||||||
eos_config:
|
eos_config:
|
||||||
|
@ -65,6 +71,7 @@
|
||||||
after: exit
|
after: exit
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
match: line
|
match: line
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -88,6 +95,7 @@
|
||||||
after: exit
|
after: exit
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
match: exact
|
match: exact
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
always:
|
always:
|
||||||
|
@ -96,5 +104,6 @@
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/common_config.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/common_config.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
- no ip route 192.168.3.0/24 192.168.0.1
|
- no ip route 192.168.3.0/24 192.168.0.1
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
- name: configure static route
|
- name: configure static route
|
||||||
eos_static_route:
|
eos_static_route:
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
admin_distance: 2
|
admin_distance: 2
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,6 +36,7 @@
|
||||||
admin_distance: 2
|
admin_distance: 2
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
@ -47,6 +50,7 @@
|
||||||
- no ip route 192.168.3.0/24 192.168.0.1
|
- no ip route 192.168.3.0/24 192.168.0.1
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/common_utils.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/common_utils.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
||||||
|
@ -63,4 +67,5 @@
|
||||||
rx_rate: ge(0)
|
rx_rate: ge(0)
|
||||||
authorize: yes
|
authorize: yes
|
||||||
provider: "{{ eapi }}"
|
provider: "{{ eapi }}"
|
||||||
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: configure domain_list using platform agnostic module
|
- name: configure domain_list using platform agnostic module
|
||||||
|
@ -18,7 +17,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -34,7 +32,6 @@
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eos cli/net_system.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END eos cli/net_system.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: configure domain_list
|
- name: configure domain_list
|
||||||
|
@ -15,7 +14,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -30,7 +28,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -42,7 +39,6 @@
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -55,7 +51,6 @@
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -68,7 +63,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -82,7 +76,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -95,7 +88,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- eng.ansible.com
|
- eng.ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -111,7 +103,6 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- eng.ansible.com
|
- eng.ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -126,7 +117,6 @@
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
- no ip domain-list eng.ansible.com
|
- no ip domain-list eng.ansible.com
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/set_domain_list.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/set_domain_list.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -5,13 +5,11 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip domain-name
|
lines: no ip domain-name
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: configure domain_name
|
- name: configure domain_name
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_name: eng.ansible.com
|
domain_name: eng.ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -22,7 +20,6 @@
|
||||||
- name: verify domain_name
|
- name: verify domain_name
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_name: eng.ansible.com
|
domain_name: eng.ansible.com
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -34,7 +31,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip domain-name
|
lines: no ip domain-name
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/set_domain_name.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -5,13 +5,11 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname switch
|
lines: hostname switch
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: configure hostname
|
- name: configure hostname
|
||||||
eos_system:
|
eos_system:
|
||||||
hostname: foo
|
hostname: foo
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -22,7 +20,6 @@
|
||||||
- name: verify hostname
|
- name: verify hostname
|
||||||
eos_system:
|
eos_system:
|
||||||
hostname: foo
|
hostname: foo
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -34,7 +31,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: "hostname {{ inventory_hostname }}"
|
lines: "hostname {{ inventory_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/set_hostname.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -7,13 +7,11 @@
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
- vrf definition ansible
|
- vrf definition ansible
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: configure lookup_source
|
- name: configure lookup_source
|
||||||
eos_system:
|
eos_system:
|
||||||
lookup_source: Management1
|
lookup_source: Management1
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -25,7 +23,6 @@
|
||||||
- name: verify lookup_source
|
- name: verify lookup_source
|
||||||
eos_system:
|
eos_system:
|
||||||
lookup_source: Management1
|
lookup_source: Management1
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -38,7 +35,6 @@
|
||||||
lookup_source:
|
lookup_source:
|
||||||
- interface: Management1
|
- interface: Management1
|
||||||
vrf: ansible
|
vrf: ansible
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -54,7 +50,6 @@
|
||||||
lookup_source:
|
lookup_source:
|
||||||
- interface: Management1
|
- interface: Management1
|
||||||
vrf: ansible
|
vrf: ansible
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -68,7 +63,6 @@
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
- no vrf definition ansible
|
- no vrf definition ansible
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/set_lookup_source.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/set_lookup_source.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
- no ip name-server
|
- no ip name-server
|
||||||
- vrf definition ansible
|
- vrf definition ansible
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: configure name_servers
|
- name: configure name_servers
|
||||||
|
@ -16,7 +15,6 @@
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
- 3.3.3.3
|
- 3.3.3.3
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -34,7 +32,6 @@
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
- 3.3.3.3
|
- 3.3.3.3
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -48,7 +45,7 @@
|
||||||
# - 1.1.1.1
|
# - 1.1.1.1
|
||||||
# - { server: 2.2.2.2, vrf: ansible }
|
# - { server: 2.2.2.2, vrf: ansible }
|
||||||
# - 3.3.3.3
|
# - 3.3.3.3
|
||||||
# provider: "{{ cli }}"
|
# become: yes
|
||||||
# register: result
|
# register: result
|
||||||
|
|
||||||
#- assert:
|
#- assert:
|
||||||
|
@ -64,7 +61,7 @@
|
||||||
# - 1.1.1.1
|
# - 1.1.1.1
|
||||||
# - { server: 2.2.2.2, vrf: ansible }
|
# - { server: 2.2.2.2, vrf: ansible }
|
||||||
# - 3.3.3.3
|
# - 3.3.3.3
|
||||||
# provider: "{{ cli }}"
|
# become: yes
|
||||||
# register: result
|
# register: result
|
||||||
#
|
#
|
||||||
#- assert:
|
#- assert:
|
||||||
|
@ -76,7 +73,6 @@
|
||||||
name_servers:
|
name_servers:
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -92,7 +88,6 @@
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
- no vrf definition ansible
|
- no vrf definition ansible
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ cli }}"
|
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END cli/set_name_servers.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- name: configure domain_list using platform agnostic module
|
- name: configure domain_list using platform agnostic module
|
||||||
net_system:
|
net_system:
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -32,6 +32,6 @@
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eos eapi/net_system.yaml on connection={{ ansible_connection }}"
|
- debug: msg="END eos eapi/net_system.yaml on connection={{ ansible_connection }}"
|
||||||
|
|
|
@ -6,17 +6,15 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- name: configure domain_list
|
- name: configure domain_list
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -30,8 +28,7 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -42,8 +39,7 @@
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -55,8 +51,7 @@
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -68,8 +63,7 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -82,8 +76,7 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- redhat.com
|
- redhat.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -95,8 +88,7 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- eng.ansible.com
|
- eng.ansible.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -111,8 +103,7 @@
|
||||||
domain_list:
|
domain_list:
|
||||||
- ansible.com
|
- ansible.com
|
||||||
- eng.ansible.com
|
- eng.ansible.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -125,8 +116,7 @@
|
||||||
- no ip domain-list ansible.com
|
- no ip domain-list ansible.com
|
||||||
- no ip domain-list redhat.com
|
- no ip domain-list redhat.com
|
||||||
- no ip domain-list eng.ansible.com
|
- no ip domain-list eng.ansible.com
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/set_domain_list.yaml"
|
- debug: msg="END eapi/set_domain_list.yaml"
|
||||||
|
|
|
@ -4,15 +4,13 @@
|
||||||
- name: setup
|
- name: setup
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip domain-name
|
lines: no ip domain-name
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- name: configure domain_name
|
- name: configure domain_name
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_name: eng.ansible.com
|
domain_name: eng.ansible.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -22,8 +20,7 @@
|
||||||
- name: verify domain_name
|
- name: verify domain_name
|
||||||
eos_system:
|
eos_system:
|
||||||
domain_name: eng.ansible.com
|
domain_name: eng.ansible.com
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -33,8 +30,7 @@
|
||||||
- name: teardown
|
- name: teardown
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: no ip domain-name
|
lines: no ip domain-name
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/set_domain_name.yaml"
|
- debug: msg="END eapi/set_domain_name.yaml"
|
||||||
|
|
|
@ -5,14 +5,12 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: hostname switch
|
lines: hostname switch
|
||||||
match: none
|
match: none
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- name: configure hostname
|
- name: configure hostname
|
||||||
eos_system:
|
eos_system:
|
||||||
hostname: foo
|
hostname: foo
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -22,8 +20,7 @@
|
||||||
- name: verify hostname
|
- name: verify hostname
|
||||||
eos_system:
|
eos_system:
|
||||||
hostname: foo
|
hostname: foo
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,7 +31,6 @@
|
||||||
eos_config:
|
eos_config:
|
||||||
lines: "hostname {{ inventory_hostname }}"
|
lines: "hostname {{ inventory_hostname }}"
|
||||||
match: none
|
match: none
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
|
|
||||||
- debug: msg="END eapi/set_hostname.yaml"
|
- debug: msg="END eapi/set_hostname.yaml"
|
||||||
|
|
|
@ -6,15 +6,13 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
- vrf definition ansible
|
- vrf definition ansible
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- name: configure lookup_source
|
- name: configure lookup_source
|
||||||
eos_system:
|
eos_system:
|
||||||
lookup_source: Management1
|
lookup_source: Management1
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -25,8 +23,7 @@
|
||||||
- name: verify lookup_source
|
- name: verify lookup_source
|
||||||
eos_system:
|
eos_system:
|
||||||
lookup_source: Management1
|
lookup_source: Management1
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -38,8 +35,7 @@
|
||||||
lookup_source:
|
lookup_source:
|
||||||
- interface: Management1
|
- interface: Management1
|
||||||
vrf: ansible
|
vrf: ansible
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -54,8 +50,7 @@
|
||||||
lookup_source:
|
lookup_source:
|
||||||
- interface: Management1
|
- interface: Management1
|
||||||
vrf: ansible
|
vrf: ansible
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -67,8 +62,7 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
- no vrf definition ansible
|
- no vrf definition ansible
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/set_lookup_source.yaml"
|
- debug: msg="END eapi/set_lookup_source.yaml"
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip name-server
|
- no ip name-server
|
||||||
- vrf definition ansible
|
- vrf definition ansible
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- name: configure name_servers
|
- name: configure name_servers
|
||||||
eos_system:
|
eos_system:
|
||||||
|
@ -16,8 +15,7 @@
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
- 3.3.3.3
|
- 3.3.3.3
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -34,8 +32,7 @@
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
- 3.3.3.3
|
- 3.3.3.3
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -48,7 +45,7 @@
|
||||||
# - 1.1.1.1
|
# - 1.1.1.1
|
||||||
# - { server: 2.2.2.2, vrf: ansible }
|
# - { server: 2.2.2.2, vrf: ansible }
|
||||||
# - 3.3.3.3
|
# - 3.3.3.3
|
||||||
# provider: "{{ eapi }}"
|
# become: yes
|
||||||
# register: result
|
# register: result
|
||||||
|
|
||||||
#- assert:
|
#- assert:
|
||||||
|
@ -64,9 +61,9 @@
|
||||||
# - 1.1.1.1
|
# - 1.1.1.1
|
||||||
# - { server: 2.2.2.2, vrf: ansible }
|
# - { server: 2.2.2.2, vrf: ansible }
|
||||||
# - 3.3.3.3
|
# - 3.3.3.3
|
||||||
# provider: "{{ eapi }}"
|
# become: yes
|
||||||
# register: result
|
# register: result
|
||||||
|
#
|
||||||
#- assert:
|
#- assert:
|
||||||
# that:
|
# that:
|
||||||
# - result.changed == false
|
# - result.changed == false
|
||||||
|
@ -76,8 +73,7 @@
|
||||||
name_servers:
|
name_servers:
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
timeout: 30
|
become: yes
|
||||||
provider: "{{ eapi }}"
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -91,8 +87,7 @@
|
||||||
lines:
|
lines:
|
||||||
- no ip domain lookup source-interface
|
- no ip domain lookup source-interface
|
||||||
- no vrf definition ansible
|
- no vrf definition ansible
|
||||||
timeout: 30
|
|
||||||
match: none
|
match: none
|
||||||
provider: "{{ eapi }}"
|
become: yes
|
||||||
|
|
||||||
- debug: msg="END eapi/set_name_servers.yaml"
|
- debug: msg="END eapi/set_name_servers.yaml"
|
||||||
|
|
Loading…
Reference in a new issue