Installation

The modules and plugins need to be installed on the Ansible control node, often called the Ansible controller and Ansible needs to be configured so that the modules and plugins can be found by Ansible.

Installing the Ansible modules and plugins is a straight forward process. Copy the Ansible modules and plugins to a directory on the Ansible control node, let us assume /tmp/mandm. Later on these files are copied to the destination directories on the control node.

Requirements

The Ansible integration modules and plugins do not need anything beyond a standard Ansible installation. The minimum Ansible version is 2.7 and up and the required Python version is 2.7+ or 3.5+.

Ansible modules

The Ansible modules can than be placed in a number of directories, depending on your installation and requirements.

/usr/share/ansible/plugins/modules/

System wide installation, modules available to all users

~/.ansible/plugins/modules/

Modules available only to the current user, as the modules are installed in the users home-directory

/etc/ansible/library/

Local installation. As most Ansible installations use the /etc/ansible directory as the Ansible top-directory (as this is the default in an Ansible installation), this is probably the best installation option. When installing the modules in this directory, the Ansible library path needs to be set in the /etc/ansible/ansible.cfg file, pointing to the module directory.

library = /etc/ansible/library

After installing the Ansible modules a check can be made to determine if the modules are installed correctly. Run the command:

ansible-doc -l | grep '^mm_'

This should produce a list with all the Micetro Ansible modules.

Ansible lookup plugins

The set of Ansible Integration modules consists of multiple sets (lookup and inventory) and these should be installed in their own directories.

The lookup plugins can be installed in:

/usr/share/ansible/plugins/lookup

System wide installation, modules available to all users

~/.ansible/plugins/lookup

Plugins available only to the current user, as the plugins are installed in the users home-directory

/etc/ansible/plugins/lookup

Local installation. As most Ansible installations use the /etc/ansible directory as the Ansible top-directory (as this is the default in an Ansible installation) this is probably the best installation option. When installing the lookup plugins in this directory, the Ansible lookup path needs to be set in the /etc/ansible/ansible.cfg file, pointing to the lookup plugin directory.

lookup_plugins = /usr/share/ansible/plugins/lookup:\
                 /etc/ansible/plugins/lookup

To check if the modules are installed correctly and are available to Ansible, issue the command:

ansible-doc -t lookup -l | grep '^mm_'

Which should produce a list with all the Micetro Ansible lookup plugins.

Ansible inventory plugins

The inventory plugins can be installed in:

/usr/share/ansible/plugins/inventory

System wide installation, modules available to all users

~/.ansible/plugins/inventory

Plugins available only to the current user, as the plugins are installed in the users home-directory

/etc/ansible/plugins/inventory

Local installation. As most Ansible installations use the /etc/ansible directory as the Ansible top-directory (as this is the default in an Ansible installation) this is probably the best installation option. When installing the inventory plugins in this directory, the Ansible lookup path needs to be set in the /etc/ansible/ansible.cfg file, pointing to the lookup plugin directory.

inventory_plugins = /usr/share/ansible/plugins/inventory:\
                    /etc/ansible/plugins/inventory

To check if the modules are installed correctly and are available to Ansible, issue the command:

ansible-doc -t inventory -l | grep '^mm_'

Which should produce a list with all the Micetro Ansible inventory plugins.

The mm_inventory plugin also needs some extra configuration, see mm_inventory plugin for more information.