From e7750768f707b92887590393e8317e82ab82c8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Tue, 11 Dec 2018 07:07:07 -0500 Subject: [PATCH] nmcli example: modern way to install packages (#49110) - use the generic `package` module, this way it will cover dnf and yum - to not specify the x86_64 arch, the package manager will pull the fine version anyway - with_items with package is deprecated - libnm-qt-devel is only in Fedora 27 and 28. --- lib/ansible/modules/net_tools/nmcli.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/net_tools/nmcli.py b/lib/ansible/modules/net_tools/nmcli.py index 595f51e4c32..0a81d05e379 100644 --- a/lib/ansible/modules/net_tools/nmcli.py +++ b/lib/ansible/modules/net_tools/nmcli.py @@ -314,15 +314,13 @@ EXAMPLES = ''' tasks: - name: install needed network manager libs - yum: - name: '{{ item }}' + package: + name: + - NetworkManager-glib + - nm-connection-editor + - libsemanage-python + - policycoreutils-python state: installed - with_items: - - NetworkManager-glib - - libnm-qt-devel.x86_64 - - nm-connection-editor.x86_64 - - libsemanage-python - - policycoreutils-python ##### Working with all cloud nodes - Teaming - name: try nmcli add team - conn_name only & ip4 gw4