mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
allow user provided fact scan modules
This commit is contained in:
parent
1a5823d0b3
commit
c2a87bbb53
@ -9,17 +9,15 @@ from django.core.management.base import NoArgsCommand
|
||||
from awx.fact.models.fact import * # noqa
|
||||
from awx.main.socket import Socket
|
||||
|
||||
_MODULES = ['packages', 'services', 'files']
|
||||
|
||||
logger = logging.getLogger('awx.main.commands.run_fact_cache_receiver')
|
||||
class FactCacheReceiver(object):
|
||||
def __init__(self):
|
||||
self.timestamp = None
|
||||
|
||||
def _determine_module(self, facts):
|
||||
for x in _MODULES:
|
||||
if x in facts:
|
||||
return x
|
||||
# Symantically determine the module type
|
||||
if len(facts) == 1:
|
||||
return facts.iterkeys().next()
|
||||
return 'ansible'
|
||||
|
||||
def _extract_module_facts(self, module, facts):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user