summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index c23afbc26..ad4b1e47b 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -22,9 +22,14 @@ from distutils.util import strtobool
from distutils.version import LooseVersion
import struct
import socket
-from dbus import SystemBus, Interface
-from dbus.exceptions import DBusException
+HAVE_DBUS=False
+try:
+ from dbus import SystemBus, Interface
+ from dbus.exceptions import DBusException
+ HAVE_DBUS=True
+except ImportError:
+ pass
DOCUMENTATION = '''
---
@@ -2293,6 +2298,9 @@ def main():
add_file_common_args=True,
)
+ if not HAVE_DBUS:
+ module.fail_json(msg="This module requires dbus python bindings")
+
module.params['gather_subset'] = ['hardware', 'network', 'virtual', 'facter']
module.params['gather_timeout'] = 10
module.params['filter'] = '*'