From 37b053727971a8cf80d45c648667cc46f8e212bf Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Thu, 9 Nov 2017 22:43:49 +0530 Subject: Fix ios_config file prompt issue (#32744) Fixes #23263 Add a carriage return (\r) at end on copy config command which results in prompt on cli terminal --- .../targets/ios_config/tests/cli/save.yaml | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'test/integration') diff --git a/test/integration/targets/ios_config/tests/cli/save.yaml b/test/integration/targets/ios_config/tests/cli/save.yaml index a521a8888d..e74c11f634 100644 --- a/test/integration/targets/ios_config/tests/cli/save.yaml +++ b/test/integration/targets/ios_config/tests/cli/save.yaml @@ -34,10 +34,33 @@ # FIXME https://github.com/ansible/ansible-modules-core/issues/5008 ignore_errors: true +- name: delete config (setup) + ios_config: + replace: line + lines: + - "ip http server" + save_when: modified + authorize: yes + register: result + +- name: save should always run + ios_config: + replace: line + lines: + - "ip http server" + save_when: modified + authorize: yes + register: result + - assert: that: - "result.changed == true" -# FIXME https://github.com/ansible/ansible-modules-core/issues/5008 - ignore_errors: true + +- name: teardown + ios_config: + lines: + - "no ip http server" + authorize: yes + register: result - debug: msg="END cli/save.yaml" -- cgit v1.2.1