DevConf.IN 2025

Developing Ansible Modules - Getting Started
2025-03-01 , Meetups (Amphitheatre - Chanakya Building / School of Business)

A module is a reusable, standalone script that Ansible runs on your behalf, either locally or remotely. Modules interact with your local machine, an API, or a remote system to perform specific tasks like changing a database password or spinning up a cloud instance. Each module can be used by the Ansible API, or by the ansible or ansible-playbook programs. A module provides a defined interface, accepting arguments and returning information to Ansible by printing a JSON string to stdout before exiting. Ansible ships with thousands of modules, and you can easily write your own. If you’re writing a module for local use, you can choose any programming language and follow your own rules. This workshop illustrates how to get started developing an Ansible module in Python.

Agenda
- Environment setup
- Starting a new module
- Exercising your module code
- Exercising module code locally
- Exercising module code in a playbook
- Testing basics
- Sanity tests
- Unit tests
- Contributing back to Ansible
- Communication and development support


What level of experience should the audience have to best understand your session?

Intermediate - attendees should be familiar with the subject

Ompragash has a knack for Automation and AI and currently serves as a Senior Software Engineer at Harness. When he’s not at work, you’ll often find him tinkering AI Agents, crafting pipelines, or automating complex routines. He can be found on GitHub: @ompragash

This speaker also appears in:

Nikhil Jain is a Principal Software Engineer at Redhat with over 14 years of DevOps experience. He has been using Ansible and contributing to it from the inception days of Ansible. He currently works closely with Ansible Engineering.
He is an Open Source Enthusiast and is part of Ansible Pune Meetup Organizing team. He has presented multiple Ansible sessions at various global and local events. Apart from sitting in front of his computer automating things using Ansible, he loves watching sports and is a regular part of the local cricket team.

This speaker also appears in: