Modules are the main building blocks of Ansible playbooks. Although we do not generally speak of “module plugins”, a module is a type of plugin. For a developer-focused description of the differences between modules and other plugins, see Modules and plugins: what is the difference?.
You can enable a custom module by dropping it into one of these locations:
ANSIBLE_LIBRARY environment variable ($ANSIBLE_LIBRARY takes a colon-separated list like $PATH)~/.ansible/plugins/modules//usr/share/ansible/plugins/modules/For more information on using local custom modules, see Adding a module or plugin outside of a collection.
For information on using modules in ad hoc tasks, see Introduction to ad hoc commands. For information on using modules in playbooks, see Ansible playbooks.
See also
An introduction to playbooks
An introduction to creating Ansible modules
A guide to creating Ansible collections
Got questions? Need help? Want to share your ideas? Visit the Ansible communication guide
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/plugins/module.html