mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Allow hosts not in inventory to override inventory with -i "host1,host2:port" etc, which is the original intent
of --override-hosts.
This commit is contained in:
parent
d4f660edc3
commit
e060b06081
1 changed files with 4 additions and 0 deletions
|
@ -50,6 +50,10 @@ class Inventory(object):
|
||||||
# whether the inventory file is a script
|
# whether the inventory file is a script
|
||||||
self._is_script = False
|
self._is_script = False
|
||||||
|
|
||||||
|
if type(host_list) in [ str, unicode ]:
|
||||||
|
if host_list.find(",") != -1:
|
||||||
|
host_list = host_list.split(",")
|
||||||
|
|
||||||
if type(host_list) == list:
|
if type(host_list) == list:
|
||||||
all = Group('all')
|
all = Group('all')
|
||||||
self.groups = [ all ]
|
self.groups = [ all ]
|
||||||
|
|
Loading…
Reference in a new issue