mirror of https://github.com/ansible/ansible.git
integration/targets/ios_* work to support IOS (#20414)
* WIP * Don't set connection: network_cli in the playbook * ios_config tests now passing * Create test loopback device * delete * ios_* pass (apart from ios_facts) * Remove provider linespull/20524/head
parent
7330ab8062
commit
a12033a6e0
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- prepare_ios_tests
|
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- prepare_ios_tests
|
@ -1,49 +0,0 @@
|
||||
---
|
||||
- debug: msg="START cli/src_match_none.yaml"
|
||||
|
||||
- name: setup
|
||||
ios_config:
|
||||
commands:
|
||||
- no description
|
||||
- no shutdown
|
||||
parents:
|
||||
- interface Loopback999
|
||||
match: none
|
||||
provider: "{{ cli }}"
|
||||
|
||||
- name: configure device with config
|
||||
ios_config:
|
||||
src: basic/config.j2
|
||||
provider: "{{ cli }}"
|
||||
match: none
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
# https://github.com/ansible/ansible-modules-core/issues/4807
|
||||
- "result.updates is not defined"
|
||||
|
||||
- name: check device with config
|
||||
ios_config:
|
||||
src: basic/config.j2
|
||||
provider: "{{ cli }}"
|
||||
<<<<<<< f84b1d496e52b69dab38894e7ec7b90b63857331
|
||||
=======
|
||||
match: none
|
||||
>>>>>>> Tests for ios_config
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
# Idempotent test
|
||||
# https://github.com/ansible/ansible-modules-core/issues/4807
|
||||
- "result.changed == false"
|
||||
- "result.updates is not defined"
|
||||
<<<<<<< f84b1d496e52b69dab38894e7ec7b90b63857331
|
||||
=======
|
||||
# FIXME bug https://github.com/ansible/ansible-modules-core/issues/5003
|
||||
ignore_errors: true
|
||||
>>>>>>> Tests for ios_config
|
||||
|
||||
- debug: msg="END cli/src_match_none.yaml"
|
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- prepare_ios_tests
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Ensure we have loopback 888 for testing
|
||||
ios_config:
|
||||
src: config.j2
|
||||
|
||||
|
||||
# Some AWS hostnames can be longer than those allowed by the system we are testing
|
||||
# Truncate the hostname
|
||||
# http://jinja.pocoo.org/docs/2.9/templates/#truncate
|
||||
- set_fact:
|
||||
shorter_hostname: '{{ inventory_hostname_short| truncate(10, True, "") }}'
|
@ -0,0 +1,4 @@
|
||||
interface Loopback888
|
||||
description test for ansible
|
||||
shutdown
|
||||
|
Loading…
Reference in New Issue