mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
fix some warning of undefined name.
This commit is contained in:
parent
59d655c543
commit
5efa4d29e3
5 changed files with 13 additions and 8 deletions
|
@ -21,10 +21,13 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
import sys
|
||||
from ansible import constants as C
|
||||
from ansible.inventory.group import Group
|
||||
from .host import Host
|
||||
from ansible.plugins.inventory.aggregate import InventoryAggregateParser
|
||||
from ansible import errors
|
||||
|
||||
class Inventory:
|
||||
'''
|
||||
|
@ -98,7 +101,7 @@ class Inventory:
|
|||
'''
|
||||
|
||||
for group in self._groups:
|
||||
if group.name == group_name:
|
||||
if group.name == groupname:
|
||||
return group
|
||||
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue