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
2ade17e2
Commit
2ade17e2
authored
Apr 03, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2 changed empty inventory to warning that only localhost is available
parent
0f8bc038
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
v2/bin/ansible
+3
-1
No files found.
v2/bin/ansible
View file @
2ade17e2
...
...
@@ -29,6 +29,7 @@ from ansible.inventory import Inventory
from
ansible.parsing
import
DataLoader
from
ansible.parsing.splitter
import
parse_kv
from
ansible.playbook.play
import
Play
from
ansible.utils.display
import
Display
from
ansible.utils.cli
import
base_parser
,
validate_conflicts
,
normalize_become_options
,
ask_passwords
from
ansible.utils.vault
import
read_vault_file
from
ansible.vars
import
VariableManager
...
...
@@ -98,7 +99,8 @@ class Cli(object):
hosts
=
inventory
.
list_hosts
(
pattern
)
if
len
(
hosts
)
==
0
:
raise
AnsibleError
(
"provided hosts list is empty"
)
d
=
Display
()
d
.
warning
(
"provided hosts list is empty, only localhost is available"
)
if
options
.
listhosts
:
for
host
in
hosts
:
...
...
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