SlideShare a Scribd company logo
Contributing  to ansible
Contributing to Ansible
Developing Ansible Modules
● software platform for CM systems
● Agentless
● Secure
● Scalable
....wait a min....what the heck is Ansible?
....so what can we do with ansible?
● package installation
● shell commands
● install/update package
● management systems, clone git
● stop, start, re-start service
.....also ansible comes with batteries included!!
● Ansible comes bundled with nearly all
the mostly used
applications/protocols etc in
computing world.
http://docs.ansible.com/list_of_all_modu
...need any thing out of the box??
write down our own custom
modules....and the best
part...guess??
It's free of any language
barrier
....cool...seems interesting, so what are the different
components of a module?
Though ansible modules can be written in any language, we will stick to Python in this post.
In Python, a module is generally a single file with 3 different parts:
➢ Documentation: A multiline string literal and a valid YAML document. It contains the
detailed description of module.
➢ Logic: The programatic way to perform task and uses various resources provided by
Ansible.
➢ Ansible framework: bunch of basic utilities to perform its tasks, imported by all modules
using the following import statement:
from ansible.module_utils.basic import *
...let's try bulding some custom
modules..
●
files hosted on github....
● https://github.com/hellodk
● repository : ansible-meetup-bangalore
Basic configurations
1. From the file /etc/ansible/ansible.cfg, uncomment the line
library = /usr/share/ansible
2. In the file /etc/ansible/hosts
create an entry with 127.0.0.1
...steps to follow
1. Create a new directory inside /usr/share/ansible/
sudo mkdir external
2. Make a new file, inside the external directory
sudo vi test_module
3. Now you can write your yml based play-book
vi test_playbook.yml
....executing the module via
playbook
$ ansible-playbook test_yml.yml
Contributing  to ansible
.....all yours...
give a shout for any queries/questions
Thanks!!
Deepak
hello.dk@outlook.com
in.linkedin.com/in/hellodk

More Related Content

PDF
Improve your workflow
PPTX
Es build presentation
PDF
Export pdf with puppeteer
PDF
Mozilla Shumway - opensource meetup budapest
PDF
Vim conf2019
PPTX
Browserium
PPTX
Browserium
ODP
Using PHP IDEs with Drupal (DrupalDevDays Szeged 2014)
Improve your workflow
Es build presentation
Export pdf with puppeteer
Mozilla Shumway - opensource meetup budapest
Vim conf2019
Browserium
Browserium
Using PHP IDEs with Drupal (DrupalDevDays Szeged 2014)

What's hot (10)

PDF
deoplete: The dark powered auto completion plugin for neovim
PDF
vimshell made other shells legacy
ODP
Neosnippet.vim + Deoppet.nvim in Vim conf 2017
PDF
Typescript for the programmers who like javascript
PDF
Let's talk about neovim
PPTX
TypeScript Introduction
PDF
TypeScript 101 - Studio Session - Accenture Liquid Studio
PDF
Nuxeo World Session: Building Packages for the Nuxeo Marketplace
PPTX
TypeScript Jump Start
PDF
Swift for back end: A new generation of full stack languages?
deoplete: The dark powered auto completion plugin for neovim
vimshell made other shells legacy
Neosnippet.vim + Deoppet.nvim in Vim conf 2017
Typescript for the programmers who like javascript
Let's talk about neovim
TypeScript Introduction
TypeScript 101 - Studio Session - Accenture Liquid Studio
Nuxeo World Session: Building Packages for the Nuxeo Marketplace
TypeScript Jump Start
Swift for back end: A new generation of full stack languages?
Ad

Viewers also liked (9)

PPT
Meridian technologies social media advertising presentation
PDF
CV artistico
PPSX
Bill martin how to get started on paid search
PPTX
Lesson 1 review of foundation- 2bup
PPT
WWYD D PP
PPT
How to generate leads using linkedin
PDF
PDF SM LDS Employment October 2015
PPTX
Disadvantages Of Scaling Content: A Slideshow
PPT
Crazy Marketing Ideas To Leverage Your Business Visibility
Meridian technologies social media advertising presentation
CV artistico
Bill martin how to get started on paid search
Lesson 1 review of foundation- 2bup
WWYD D PP
How to generate leads using linkedin
PDF SM LDS Employment October 2015
Disadvantages Of Scaling Content: A Slideshow
Crazy Marketing Ideas To Leverage Your Business Visibility
Ad

Similar to Contributing to ansible (20)

PDF
Ansible Overview - System Administration and Maintenance
PDF
Introduction to Ansible in RHEL- RHCE.pdf
PDF
Top 50 Ansible Interview Questions And Answers in 2023.pdf
PDF
Ansible not only for Dummies
PPTX
Introduction to ansible
PPTX
SESSION Ansible how to deploy and push resources
PDF
Ansible + WordPress
PDF
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
PPTX
Ansible Network Automation session1
PPTX
Ansible as configuration management tool for devops
PPTX
Automating with ansible (Part A)
PDF
Automating with ansible (part a)
PDF
Ansible new paradigms for orchestration
PPTX
Basics of Ansible - Sahil Davawala
ODP
ansible why ?
PDF
Ansible automation tool with modules
PPTX
ansible : Infrastructure automation,idempotent and more
PDF
Getting Started with Ansible - Jake.pdf
PPTX
Ansible module development 101
Ansible Overview - System Administration and Maintenance
Introduction to Ansible in RHEL- RHCE.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdf
Ansible not only for Dummies
Introduction to ansible
SESSION Ansible how to deploy and push resources
Ansible + WordPress
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible Network Automation session1
Ansible as configuration management tool for devops
Automating with ansible (Part A)
Automating with ansible (part a)
Ansible new paradigms for orchestration
Basics of Ansible - Sahil Davawala
ansible why ?
Ansible automation tool with modules
ansible : Infrastructure automation,idempotent and more
Getting Started with Ansible - Jake.pdf
Ansible module development 101

Recently uploaded (20)

PPTX
Management Information system : MIS-e-Business Systems.pptx
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PPTX
communication and presentation skills 01
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
737-MAX_SRG.pdf student reference guides
Management Information system : MIS-e-Business Systems.pptx
Nature of X-rays, X- Ray Equipment, Fluoroscopy
communication and presentation skills 01
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Safety Seminar civil to be ensured for safe working.
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Automation-in-Manufacturing-Chapter-Introduction.pdf
August 2025 - Top 10 Read Articles in Network Security & Its Applications
R24 SURVEYING LAB MANUAL for civil enggi
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
distributed database system" (DDBS) is often used to refer to both the distri...
"Array and Linked List in Data Structures with Types, Operations, Implementat...
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Soil Improvement Techniques Note - Rabbi
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
737-MAX_SRG.pdf student reference guides

Contributing to ansible

  • 3. ● software platform for CM systems ● Agentless ● Secure ● Scalable ....wait a min....what the heck is Ansible?
  • 4. ....so what can we do with ansible? ● package installation ● shell commands ● install/update package ● management systems, clone git ● stop, start, re-start service
  • 5. .....also ansible comes with batteries included!! ● Ansible comes bundled with nearly all the mostly used applications/protocols etc in computing world. http://docs.ansible.com/list_of_all_modu
  • 6. ...need any thing out of the box?? write down our own custom modules....and the best part...guess??
  • 7. It's free of any language barrier
  • 8. ....cool...seems interesting, so what are the different components of a module? Though ansible modules can be written in any language, we will stick to Python in this post. In Python, a module is generally a single file with 3 different parts: ➢ Documentation: A multiline string literal and a valid YAML document. It contains the detailed description of module. ➢ Logic: The programatic way to perform task and uses various resources provided by Ansible. ➢ Ansible framework: bunch of basic utilities to perform its tasks, imported by all modules using the following import statement: from ansible.module_utils.basic import *
  • 9. ...let's try bulding some custom modules.. ●
  • 10. files hosted on github.... ● https://github.com/hellodk ● repository : ansible-meetup-bangalore
  • 11. Basic configurations 1. From the file /etc/ansible/ansible.cfg, uncomment the line library = /usr/share/ansible 2. In the file /etc/ansible/hosts create an entry with 127.0.0.1
  • 12. ...steps to follow 1. Create a new directory inside /usr/share/ansible/ sudo mkdir external 2. Make a new file, inside the external directory sudo vi test_module 3. Now you can write your yml based play-book vi test_playbook.yml
  • 13. ....executing the module via playbook $ ansible-playbook test_yml.yml
  • 15. .....all yours... give a shout for any queries/questions