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
832b3ebe
Commit
832b3ebe
authored
Jan 16, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds to v2 the ability to run with empty inventory (implicit localhost),
which is now a warning and not an error.
parent
771325c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
v2/bin/ansible-playbook
+2
-1
No files found.
v2/bin/ansible-playbook
View file @
832b3ebe
...
...
@@ -15,6 +15,7 @@ from ansible.playbook.task import Task
from
ansible.utils.cli
import
base_parser
from
ansible.utils.vars
import
combine_vars
from
ansible.vars
import
VariableManager
from
ansible.utils
import
warning
#---------------------------------------------------------------------------------------------------
...
...
@@ -138,7 +139,7 @@ def main(args):
inventory
=
Inventory
(
loader
=
loader
,
variable_manager
=
variable_manager
,
host_list
=
options
.
inventory
)
inventory
.
subset
(
options
.
subset
)
if
len
(
inventory
.
list_hosts
())
==
0
:
raise
AnsibleError
(
"provided hosts list is empty
"
)
warning
(
"provided hosts list is empty, only localhost is available
"
)
# create the playbook executor, which manages running the plays
# via a task queue manager
...
...
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