mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
allow fact objects to be instantiated w/o triggering all fact collection
this opens the ability to do specific facts at much lower cost.
This commit is contained in:
parent
0f2f022bb0
commit
504995bda2
1 changed files with 17 additions and 14 deletions
|
@ -118,8 +118,11 @@ class Facts(object):
|
|||
{ 'path' : '/usr/bin/pkg', 'name' : 'pkg' },
|
||||
]
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, load_on_init=True):
|
||||
|
||||
self.facts = {}
|
||||
|
||||
if load_on_init:
|
||||
self.get_platform_facts()
|
||||
self.get_distribution_facts()
|
||||
self.get_cmdline()
|
||||
|
|
Loading…
Reference in a new issue