2017-02-26 14:42:41 +00:00
|
|
|
---
|
2018-01-05 22:01:45 +00:00
|
|
|
- debug: msg="START connection={{ ansible_connection }}/sysmtu.yaml"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
2017-02-26 14:42:41 +00:00
|
|
|
|
|
|
|
- name: setup
|
|
|
|
nxos_config:
|
|
|
|
lines: no system jumbomtu
|
|
|
|
match: none
|
2017-08-17 08:39:13 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-02-26 14:42:41 +00:00
|
|
|
|
|
|
|
- name: configure system mtu
|
|
|
|
nxos_mtu:
|
|
|
|
sysmtu: 2000
|
2017-08-17 08:39:13 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-02-26 14:42:41 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: verify system mtu
|
|
|
|
nxos_mtu:
|
|
|
|
sysmtu: 2000
|
2017-08-17 08:39:13 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-02-26 14:42:41 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
2017-04-06 16:26:17 +00:00
|
|
|
- name: configure invalid (odd) system mtu
|
2017-02-26 14:42:41 +00:00
|
|
|
nxos_mtu:
|
|
|
|
sysmtu: 2001
|
2017-08-17 08:39:13 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-02-26 14:42:41 +00:00
|
|
|
register: result
|
2017-04-06 16:26:17 +00:00
|
|
|
ignore_errors: yes
|
2017-02-26 14:42:41 +00:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
2017-04-06 16:26:17 +00:00
|
|
|
- "result.failed == true"
|
2017-02-26 14:42:41 +00:00
|
|
|
|
2017-04-06 16:26:17 +00:00
|
|
|
- name: configure invalid (large) system mtu setting
|
2017-02-26 14:42:41 +00:00
|
|
|
nxos_mtu:
|
2017-04-06 16:26:17 +00:00
|
|
|
sysmtu: 10000
|
2017-08-17 08:39:13 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-02-26 14:42:41 +00:00
|
|
|
register: result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.failed == true"
|
|
|
|
|
|
|
|
- name: teardown
|
|
|
|
nxos_config:
|
|
|
|
lines: no system jumbomtu
|
|
|
|
match: none
|
2017-08-17 08:39:13 +00:00
|
|
|
provider: "{{ connection }}"
|
2017-02-26 14:42:41 +00:00
|
|
|
|
2018-01-05 22:01:45 +00:00
|
|
|
- debug: msg="END connection={{ ansible_connection }}/sysmtu.yaml"
|