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
e0a15d0c
Commit
e0a15d0c
authored
Jun 03, 2013
by
Steven Dossett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to support inventory options from command line
parent
1ff93e6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/ansible/runner/lookup_plugins/inventory_hostnames.py
+2
-2
No files found.
lib/ansible/runner/lookup_plugins/inventory_hostnames.py
View file @
e0a15d0c
...
...
@@ -34,12 +34,12 @@ class LookupModule(object):
def
__init__
(
self
,
basedir
=
None
,
**
kwargs
):
self
.
basedir
=
basedir
self
.
host_list
=
kwargs
[
'runner'
]
.
inventory
.
host_list
def
run
(
self
,
terms
,
inject
=
None
,
**
kwargs
):
terms
=
utils
.
listify_lookup_plugin_terms
(
terms
,
self
.
basedir
,
inject
)
if
not
isinstance
(
terms
,
list
):
raise
errors
.
AnsibleError
(
"with_inventory_hostnames expects a list"
)
return
flatten
(
inventory
.
Inventory
()
.
list_hosts
(
terms
))
return
flatten
(
inventory
.
Inventory
(
self
.
host_list
)
.
list_hosts
(
terms
))
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