2017-02-26 13:12:57 +00:00
|
|
|
---
|
|
|
|
- debug: msg="START cli/configure.yaml"
|
|
|
|
|
|
|
|
- name: setup
|
|
|
|
nxos_config:
|
2017-08-10 09:29:13 +00:00
|
|
|
lines: no feature bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
match: none
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
2017-08-10 09:29:13 +00:00
|
|
|
- name: enable bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
nxos_feature:
|
2017-08-10 09:29:13 +00:00
|
|
|
feature: bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
state: enabled
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
2017-08-10 09:29:13 +00:00
|
|
|
- name: verify bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
nxos_feature:
|
2017-08-10 09:29:13 +00:00
|
|
|
feature: bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
state: enabled
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
2017-08-10 09:29:13 +00:00
|
|
|
- name: disable bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
nxos_feature:
|
2017-08-10 09:29:13 +00:00
|
|
|
feature: bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
state: disabled
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
2017-08-10 09:29:13 +00:00
|
|
|
- name: verify bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
nxos_feature:
|
2017-08-10 09:29:13 +00:00
|
|
|
feature: bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
state: disabled
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: teardown
|
|
|
|
nxos_config:
|
2017-08-10 09:29:13 +00:00
|
|
|
lines: no feature bgp
|
2017-02-26 13:12:57 +00:00
|
|
|
match: none
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
|
|
|
- debug: msg="END cli/configure.yaml"
|