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
ced93d35
Commit
ced93d35
authored
Jul 29, 2015
by
Brian Coca
Committed by
James Cammarata
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted list hosts across adhoc and playbook cli
parent
3a50c08c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
lib/ansible/cli/adhoc.py
+1
-0
lib/ansible/cli/playbook.py
+1
-1
No files found.
lib/ansible/cli/adhoc.py
View file @
ced93d35
...
...
@@ -111,6 +111,7 @@ class AdHocCLI(CLI):
self
.
display
.
warning
(
"provided hosts list is empty, only localhost is available"
)
if
self
.
options
.
listhosts
:
self
.
display
.
display
(
' hosts (
%
d):'
%
len
(
hosts
))
for
host
in
hosts
:
self
.
display
.
display
(
'
%
s'
%
host
)
return
0
...
...
lib/ansible/cli/playbook.py
View file @
ced93d35
...
...
@@ -166,7 +166,7 @@ class PlaybookCLI(CLI):
if
self
.
options
.
listhosts
:
playhosts
=
set
(
inventory
.
get_hosts
(
play
.
hosts
))
msg
+=
"
\n
pattern:
%
s
\n
total hosts:
%
d
\n
hosts
:"
%
(
play
.
hosts
,
len
(
playhosts
))
msg
+=
"
\n
pattern:
%
s
\n
hosts (
%
d)
:"
%
(
play
.
hosts
,
len
(
playhosts
))
for
host
in
playhosts
:
msg
+=
"
\n
%
s"
%
host
...
...
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