mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
misc code cleanup
This commit is contained in:
parent
5a63a48e6b
commit
1d8bb17785
3 changed files with 34 additions and 68 deletions
|
@ -94,7 +94,7 @@ class Inventory(object):
|
|||
for group in groups:
|
||||
for host in group.get_hosts():
|
||||
if group.name == pat or pat == 'all' or self._match(host.name, pat):
|
||||
#must test explicitly for None because [] means no hosts allowed
|
||||
# must test explicitly for None because [] means no hosts allowed
|
||||
if self._restriction==None or host.name in self._restriction:
|
||||
if inverted:
|
||||
if host.name in hosts:
|
||||
|
@ -128,7 +128,6 @@ class Inventory(object):
|
|||
def get_variables(self, hostname):
|
||||
|
||||
if self._is_script:
|
||||
# TODO: move this to inventory_script.py
|
||||
host = self.get_host(hostname)
|
||||
cmd = subprocess.Popen(
|
||||
[self.host_list,"--host",hostname],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue