fixes issue with config parents on eos modules (#21923)

eos_config module wasn't respecting config block path (parents).  This
patch fixes that problem.  Also fixes a number of integration tests
cases

fixes #21903
This commit is contained in:
Peter Sprygada 2017-02-25 16:40:13 -05:00 committed by GitHub
commit 1f9b503e89
11 changed files with 58 additions and 25 deletions

View file

@ -34,7 +34,7 @@
- assert:
that:
- "result.changed == true"
- "result.updates is not defined"
- "result.updates is defined"
- name: collect any backup files
find:

View file

@ -35,7 +35,6 @@
- assert:
that:
- "result.changed == false"
- "'hostname foo' in result.updates"
- name: teardown
eos_config:

View file

@ -23,7 +23,7 @@
- assert:
that:
- "result.changed == true"
- "result.updates is not defined"
- "result.updates is defined"
- name: check device with defaults included
eos_config:

View file

@ -21,11 +21,12 @@
that:
- "result.changed == true"
# https://github.com/ansible/ansible-modules-core/issues/4807
- "result.updates is not defined"
- "result.updates is defined"
- name: check device with config
eos_config:
src: basic/config.j2
defaults: yes
provider: "{{ cli }}"
register: result

View file

@ -22,13 +22,13 @@
that:
- "result.changed == true"
# https://github.com/ansible/ansible-modules-core/issues/4807
- "result.updates is not defined"
#- "result.updates is not defined"
- name: check device with config
eos_config:
src: basic/config.j2
defaults: yes
provider: "{{ cli }}"
match: none
register: result
- assert:

View file

@ -34,7 +34,7 @@
- assert:
that:
- "result.changed == true"
- "result.updates is not defined"
- "result.updates is defined"
- name: collect any backup files
find:

View file

@ -23,7 +23,7 @@
- assert:
that:
- "result.changed == true"
- "result.updates is not defined"
- "result.updates is defined"
- name: check device with defaults included
eos_config:

View file

@ -21,7 +21,7 @@
that:
- "result.changed == true"
# https://github.com/ansible/ansible-modules-core/issues/4807
- "result.updates is not defined"
- "result.updates is defined"
- name: check device with config
eos_config:

View file

@ -22,13 +22,12 @@
that:
- "result.changed == true"
# https://github.com/ansible/ansible-modules-core/issues/4807
- "result.updates is not defined"
- "result.updates is defined"
- name: check device with config
eos_config:
src: basic/config.j2
provider: "{{ eapi }}"
match: none
register: result
- assert: