nmcli: Use dbus only if it is present
diff --git a/lib/ansible/modules/network/nmcli.py b/lib/ansible/modules/network/nmcli.py
index 86a844c7ee0309..3571c9a77d1b06 100644
--- a/lib/ansible/modules/network/nmcli.py
+++ b/lib/ansible/modules/network/nmcli.py
@@ -524,7 +524,8 @@ class Nmcli(object):
 
     platform='Generic'
     distribution=None
-    bus=dbus.SystemBus()
+    if HAVE_DBUS:
+        bus=dbus.SystemBus()
     # The following is going to be used in dbus code
     DEVTYPES={1: "Ethernet",
                    2: "Wi-Fi",

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bugfix Pull Request

##### COMPONENT NAME
network/nmcli

##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
2.2
```

##### SUMMARY
Call dbus subfunction only if the dbus library is present, otherwise the following error appears:

```
NameError: name 'dbus' is not defined
```