I was trying to use the nmcli module this morning, and kept getting an error (ERROR: nmcli is not a legal parameter in an Ansible task or handler). Apparently, this module doesn’t ship with Ansible, as noted on the Extras Modules page. However, I don’t know how to install/configure an Extras module…can someone please enlighten me?
I have Ansible 1.9.4, installed via pip. Everything else seems to be working fine. Even though the extras modules supposedly are included by default, I seem to have no nmcli module in my modules directory:
I think I just needed to change /etc/ansible/ansible.cfg:
executable = /bin/bash
to
executable = /bin/sh
It is working now. I am pretty sure I needed to change that to /bin/bash for constrained sudo in the past, but I have changed how sudo is handled lately, so it might no longer be an issue.