Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ios_config file prompt issue #32744

Merged
merged 1 commit into from Nov 9, 2017
Merged

Conversation

ganeshrn
Copy link
Member

@ganeshrn ganeshrn commented Nov 9, 2017

SUMMARY

Fixes #23263

Add a carriage return (\r) at end of copy config
the command which results in prompt on cli terminal

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ios_config

ANSIBLE VERSION
2.5
ADDITIONAL INFORMATION

Fixes ansible#23263

Add a carriage return (\r) at end on copy config
command which results in prompt on cli terminal
@ansibot
Copy link
Contributor

ansibot commented Nov 9, 2017

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category support:network This issue/PR relates to code supported by the Ansible Network Team. test This PR relates to tests. labels Nov 9, 2017
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Nov 9, 2017
@ganeshrn
Copy link
Member Author

ganeshrn commented Nov 9, 2017

@privateip Thank you!

@ganeshrn ganeshrn merged commit 37b0537 into ansible:devel Nov 9, 2017
@ganeshrn ganeshrn deleted the ios_save_when_fix branch November 9, 2017 17:13
ganeshrn added a commit to ganeshrn/ansible that referenced this pull request Nov 10, 2017
Fixes ansible#23263

Add a carriage return (\r) at end on copy config
command which results in prompt on cli terminal
(cherry picked from commit 37b0537)

Update CHANGELOG.md
ganeshrn added a commit that referenced this pull request Nov 10, 2017
Fixes #23263

Add a carriage return (\r) at end on copy config
command which results in prompt on cli terminal
(cherry picked from commit 37b0537)

Update CHANGELOG.md
@termlen0
Copy link
Contributor

termlen0 commented Nov 15, 2017

Any chance this can be pushed in through a minor release? Mainly because the deprecation warning is confusing while using the deprecated save parameter:
[DEPRECATION WARNING]: Param 'save' is deprecated. See the module docs for more information. This feature will be removed in version 2.4.

Obviously the deprecated method works in 2.4....

@gundalow
Copy link
Contributor

@termlen0 the comment you've added doesn't seem to be related to the code in this PR. Could you please raise a separate issue? Thanks in advance.

@termlen0
Copy link
Contributor

@gundalow I can. This is the fix however. Without this, the save_when fails for IOS devices and the old save is deprecated, making it a relatively urgent issue IMO.

@termlen0
Copy link
Contributor

Actually #32619 seems to be already raised for this, and is referenced above.

@pippozq
Copy link

pippozq commented Nov 28, 2017

same problem here, i temporaily modified the source like:
if running_config.sha1 != startup_config.sha1 or module.params['save_when'] == 'always':
result['changed'] = True
if not module.check_mode:
#run_commands(module, 'copy running-config startup-config')
run_commands(module, 'write')
else:
module.warn('Skipping command copy running-config startup-config '
'due to check_mode. Configuration not copied to '
'non-volatile storage')
which version will fix such problem, so i can update the ansible using pip

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@dagwieers dagwieers added ios Cisco IOS community cisco Cisco technologies labels Feb 27, 2019
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. cisco Cisco technologies core_review In order to be merged, this PR must follow the core review workflow. ios Cisco IOS community module This issue/PR relates to a module. networking Network category support:network This issue/PR relates to code supported by the Ansible Network Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ios_command & ios_config: copy running-config startup-config timeout due to lack of "file prompt quiet"
8 participants