Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6d514e18
Commit
6d514e18
authored
Aug 02, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11834 from amenonsen/pauseprompt
Make 'pause: prompt=…' print the prompt
parents
9936c5f9
861da614
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/ansible/plugins/action/pause.py
+3
-3
No files found.
lib/ansible/plugins/action/pause.py
View file @
6d514e18
...
...
@@ -58,7 +58,7 @@ class ActionModule(ActionBase):
# Is 'args' empty, then this is the default prompted pause
if
self
.
_task
.
args
is
None
or
len
(
self
.
_task
.
args
.
keys
())
==
0
:
pause_type
=
'prompt'
prompt
=
"[
%
s]
\n
Press enter to continue:
\n
"
%
self
.
_task
.
get_name
()
.
strip
()
prompt
=
"[
%
s]
\n
Press enter to continue:"
%
self
.
_task
.
get_name
()
.
strip
()
# Are 'minutes' or 'seconds' keys that exist in 'args'?
elif
'minutes'
in
self
.
_task
.
args
or
'seconds'
in
self
.
_task
.
args
:
...
...
@@ -79,7 +79,7 @@ class ActionModule(ActionBase):
# Is 'prompt' a key in 'args'?
elif
'prompt'
in
self
.
_task
.
args
:
pause_type
=
'prompt'
prompt
=
"[
%
s]
\n
%
s:
\n
"
%
(
self
.
_task
.
get_name
()
.
strip
(),
self
.
_task
.
args
[
'prompt'
])
prompt
=
"[
%
s]
\n
%
s:"
%
(
self
.
_task
.
get_name
()
.
strip
(),
self
.
_task
.
args
[
'prompt'
])
else
:
# I have no idea what you're trying to do. But it's so wrong.
...
...
@@ -100,7 +100,7 @@ class ActionModule(ActionBase):
print
(
"Pausing for
%
d seconds"
%
seconds
)
print
(
"(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
\r
"
),
else
:
print
(
"(press enter to continue, ctrl+C to abort)"
)
print
(
prompt
)
# save the attributes on the existing (duped) stdin so
# that we can restore them later after we set raw mode
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment