I am trying to use the nmcli module to set DNS server and other network 
related configuration rather than using templates

*Is it still broken?  should i give up on this module?*


the module dependencies mention an old library which i believe is no longer 
avail on centos8 - https://github.com/ansible/ansible/issues/64646


   - dbus
   - NetworkManager-glib
   - nmcli



I believe This commit was meant to fix it - 
https://github.com/xuxiaowei0512/ansible/commit/86f35d169b2569ab28458ab7676ce56597bfb631
I have installed these on the client or the closest match i could find as 
the names were not exact


requirements:
- dbus
- NetworkManager-glib
- NetworkManager-libnm (or NetworkManager-glib on older systems)
- nmcli
version_added: "2.0"
description:
- Manage the network devices. Create, modify and manage various connection 
and device type e.g., ethernet, teams, bonds, vlans etc.
- 'On CentOS and Fedora like systems, the requirements can be met by 
installing the following packages: NetworkManager-glib,
- 'On CentOS 8 and Fedora >=29 like systems, the requirements can be met by 
installing the following packages: NetworkManager-nmlib,
libsemanage-python, policycoreutils-python.'
- 'On CentOS 7 and Fedora <=28 like systems, the requirements can be met by 
installing the following packages: NetworkManager-glib,


The full traceback is:
Traceback (most recent call last):
  File 
"/tmp/ansible_nmcli_payload_su0694xg/ansible_nmcli_payload.zip/ansible/modules/net_tools/nmcli.py",
 
line 568, in <module>
  File "/usr/lib64/python3.6/site-packages/gi/__init__.py", line 130, in 
require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace NMClient not available

    },
    "msg": "Failed to import the required Python library (NetworkManager 
glib API) on dktest's Python /usr/libexec/platform-python. Please read 
module documentation and install in the appropriate location. If the 
required library is installed, but Ansible is using the wrong Python 
interpreter, please consult the documentation on ansible_python_interpreter"
}

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9e134291-3669-48b5-821d-fcbe489d8902%40googlegroups.com.

Reply via email to