Here’s a list of the most commonly used Ansible modules by DevOps engineers, organized by function — from infrastructure setup and configuration to CI/CD and cloud provisioning.
1. System & Package Management
| Module |
Description |
apt, yum, dnf |
Manage packages on Debian/RedHat systems |
package |
OS-agnostic wrapper for package installs |
service |
Manage services (start, stop, restart) |
systemd |
Manage systemd units more precisely |
cron |
Manage cron jobs |
user / group |
Manage users and groups on systems |
2. File & Directory Management
| Module |
Description |
copy |
Copy files from local or inline to remote |
template |
Copy Jinja2-rendered templates to remote |
file |
Manage file permissions, ownership, etc. |
fetch |
Copy files from remote to local |
assemble |
Combine multiple files into one (e.g., configs) |
synchronize |
Rsync wrapper (great for backups or mirrors) |
3. Networking & Web
| Module |
Description |
uri |
Call REST APIs (GET/POST/PUT/etc.) |
get_url |
Download files from a URL |
iptables, ufw, firewalld |
Manage firewalls |
lineinfile |
Edit configuration lines in files |
4. Cloud Modules
| Cloud |
Modules |
| AWS |
ec2, ec2_instance, s3, iam, route53, etc. |
| Azure |
azure_rm_* modules (e.g., azure_rm_virtualmachine) |
| GCP |
gcp_compute_instance, gcp_storage_bucket, etc. |
| Generic |
community.general.* (used for multi-cloud workflows) |
5. Security & Access
| Module |
Description |
authorized_key |
Add/remove SSH keys for users |
seboolean |
Manage SELinux booleans |
firewalld |
Manage firewalld rules |
ansible-vault |
Encrypt secrets (CLI tool, not a module) |
6. DevOps / CI/CD Workflow Modules
| Module |
Description |
git |
Clone and update git repositories |
pip |
Install Python packages |
docker_container |
Manage Docker containers |
docker_image |
Manage Docker images |
command / shell |
Run shell commands (use wisely) |
include_tasks, import_tasks |
Dynamically include task files |
7. Testing & Debugging
| Module |
Description |
debug |
Print variables or messages |
assert |
Ensure conditions are true |
fail |
Explicitly fail the playbook |
wait_for |
Wait for a condition (port, file, etc.) |
Index of all Modules
https://docs.ansible.com/ansible/latest/collections/index_module.html