Automation with Ansible
We all hate repetitive work right? Yes ofcourse we hate things and tasks that come and go round and
round. That was a
stupid question to ask π. Then also I asked because I know a tool which
love repetitive work, Ansible π.
There are several scenarios in a Devops environment where people do repetitive tasks which can be automated. Like adding a new feature and rolling out the updated version of there product. This task may involve copying the new application to servers and restarting the servers one by one. This is a very common task which ops do and can be automated. When tasks get automated the entire process from development to deployment get accelerated. That acceleration can decrease the time required to roll out new updated version of the app from months to weeks or weeks to days or days to hours. Sounds cool π.
For doing automation there are many tools available like puppet, chef, saltstack and ansible. The key difference between ansible and all other automation tools is ansible is agent less. Agent less in the sense we don't need to install a client software on every nodes in a network. Ansible can communicate and configure any nodes in a network using the default ssh. Now you might be thinking it can't be used for configuring windows machine. But yes it's possible in ansible by using a different connection module called winrm. The only requirement is powershell must be installed on windows machines.
In other automation tools like chef or puppet we need to install some client software to make a communication with the master node which we use to automate tasks.
Some common terminologies in ansible:
Playbooks : Set of plays
Play : Set of tasks
tasks : Tasks are like installing a package or restarting a service
roles: Roles are organized structure of playbook which are ready to share with others
modules : Modules are kind of functions for doing a particular task. For eg. to install a package we can do it with command module. But instead of using command module you can use yum or apt module depending on your linux flavour.
ansible-galaxy : Online repository of roles where we can share or download and install roles
ansible-vault : Addon tool for encrypting valuable informations like password
ansible-playbook : Tool which is used to run playbook
ansible-doc : Tool which can be used to search and read documentation of available modules eg: ansible-doc command
Installation of ansible
$ sudo apt-get install software-properties-common $ sudo apt-add-repository ppa:ansible/ansible $ sudo apt-get update $ sudo apt-get install ansible
Simple example:
ansible localhost -m command -a whoami
After installation when you try the above statement on your terminal you can see it successfully show you the hostname. Here what ansible is doing it is making a local connection instead of ssh connection because the hostname which we are specified here is localhost. -m is for specifying the module to be used and we are using command module here. -a is for passing the arguments if any.
Hope you enjoyed reading about ansible. So lets start cooking something with ansible. Ansible + AWS?? Stay tuned π
- Thanks
Good,a nice and simple introduction
ReplyDeleteGreat Article
DeleteFinal Year Projects for CSE in Python
Python Training in Chennai
FInal Year Project Centers in Chennai
Python Training in Chennai
Greatπ«
ReplyDeleteCan i get more updates on this?
ReplyDeleteYour good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeleterpa Training in Bangalore
think for a class found this site and did not regret it I was really lucky to find it effective online casino reviews Want to try gambling then only here
ReplyDeleteWow its a very good post. The information provided by you is really very good and helpful for me. Keep sharing good information.
ReplyDeleteBest Training Institute in Bangalore BTM. My Class Training Bangalore training center for certified course, learning on Software Training Course by expert faculties, also provides job placement for fresher, experience job seekers.
Software Training Institute in Bangalore
Thank you so much for the great and very beneficial stuff that you have shared with the world.
ReplyDeleteLearn Hadoop Training from the Industry Experts we bridge the gap between the need of the industry. Softgen Infotech provide the Best Hadoop Training in Bangalore with 100% Placement Assistance. Book a Free Demo Today.
Big Data Analytics Training in Bangalore
Tableau Training in Bangalore
Data Science Training in Bangalore
Workday Training in Bangalore
Thanks for your informative article,Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
ReplyDeleteangular js training in chennai
angular js training in porur
full stack training in chennai
full stack training in porur
php training in chennai
php training in porur
photoshop training in chennai
photoshop training in porur
Nice blog...!!! Really so good post, I like your unique post and I gladly waiting for your new post...
ReplyDeletehadoop training in chennai
hadoop training in tambaram
salesforce training in chennai
salesforce training in tambaram
c and c plus plus course in chennai
c and c plus plus course in tambaram
machine learning training in chennai
machine learning training in tambaram
I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
ReplyDeletehadoop training in chennai
hadoop training in annanagar
salesforce training in chennai
salesforce training in annanagar
c and c plus plus course in chennai
c and c plus plus course in annanagar
machine learning training in chennai
machine learning training in annanagar
Thanks for a marvelous posting! I seriously enjoyed reading it, you are
ReplyDeletea great author.I will be sure to bookmark your blog and will often come back in the future.
I want to encourage yourself to continue your great job, have a
nice weekend!
data science training in chennai
data science training in velachery
android training in chennai
android training in velachery
devops training in chennai
devops training in velachery
artificial intelligence training in chennai
artificial intelligence training in velachery
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
ReplyDeleteweb designing training in chennai
web designing training in omr
digital marketing training in chennai
digital marketing training in omr
rpa training in chennai
rpa training in omr
tally training in chennai
tally training in omr
I realize that, the skills that the companies wants now are different from the skills that I have learnt during my degree course, for the reason that all the companies are digital orientated. data science course syllabus
ReplyDeleteThank you for sharing this post.
ReplyDeleteData Science Online Training
Python Online Training
This was a very informative article, indeed loved to read and clear my doubts. Keep us posted a lot more blogs. Also check out our blog pages too.
ReplyDeletedata science training in chennai
ccna training in chennai
iot training in chennai
cyber security training in chennai
ethical hacking training in chennai