ansible/test/integration/targets/ios_config/tests/cli/save.yaml
Nathaniel Case dc37b41b72 [2.5] Update ios tests (#42509) (#42515)
* [2.5] Update ios tests (#42509)

* 192.168.0.1/24 conflicts with management IP

* Images don't have the hostnames we expect
(cherry picked from commit 399d13d)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* ios test cleanup pt 2 (#42570)

* Remove local from ios_config to avoid needing to add provider

* ios_smoke should test all with local to pick up the slack

(cherry picked from commit 381263ad99)
2018-07-23 09:21:16 -07:00

54 lines
932 B
YAML

---
- debug: msg="START cli/save.yaml on connection={{ ansible_connection }}"
- name: setup
ios_config:
commands:
- no description
- no shutdown
parents:
- interface Loopback999
match: none
- name: save config
ios_config:
save: true
register: result
- assert:
that:
- "result.changed == true"
- name: save should always run
ios_config:
save: true
register: result
- name: delete config (setup)
ios_config:
replace: line
lines:
- "no ip http server"
save_when: modified
register: result
- name: save should always run
ios_config:
replace: line
lines:
- "ip http server"
save_when: modified
register: result
- assert:
that:
- "result.changed == true"
- name: teardown
ios_config:
lines:
- "no ip http server"
register: result
- debug: msg="END cli/save.yaml on connection={{ ansible_connection }}"