-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Enable ECHO in pause module #32083
Enable ECHO in pause module #32083
Conversation
+1 ... a followup feature might be adding a 'toggle' to make it private. |
88fcb7d
to
58fb579
Compare
Added the option to control echo output and several other optimizations. Tested with Python 2.7.14 and 3.6.3. Also discovered that hitting delete doesn't work. Not sure how to fix that, but probably for another time. |
It is echoing pressing enter also as ^M. Any way to suppress this? |
@@ -40,6 +40,12 @@ | |||
- Optional text to use for the prompt message. | |||
required: false | |||
default: null | |||
echo: | |||
description: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version_added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll put 2.4 in the hopes we can get this into 2.4.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, in that case , lets split PRs, get fix in 2.4, add echo in 2.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Ended up doing a lot of polishing or how this behaves.
@soumyadipDe I noticed that as well. It doesn't get stored in the registered output, so it's a visual artifact. I'll see about tweaking the flags some more, but I don't want to let that hold up this PR. |
The test
|
c2e8759
to
e98f6da
Compare
@soumyadipDe I set additional flags to hide the |
…ntrol charcters Only do this if a time limit is not set.
c6291b1
to
9bf762b
Compare
rebuild_merge |
Cherrypicked for 2.4.2beta1 |
SUMMARY
When
pause.py
terminal input code was rewritten, it disabled echo output. This PR flips some bits set mytty.setraw()
, reenabling echo output for theprompt
module as well as allowing the input to be edited interactively.Fixes #14160
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/action/pause.py
ANSIBLE VERSION
ADDITIONAL INFORMATION
Tested with Python 2.7.14 and Python 3.6.3