Ansible - Getting started…

Ansible - Getting started…

Ansible MeetUp in Sydney is one of the fewest opportunities for DevOps enthusiasts to come in and learn about Ansible from people who are already using it. Last week wasn’t different…

On the speakers panel we had Mick Pollard, Ansible devotee and his talk was all about HA Laptops with Ansible. As he is currently working remotely from his place in ‘the middle of nowhere’ (jealous much! He showed us pictures and it looks amazing!) He talked about how to stay employed living in such location and what to do if your laptop dies I could be offline for a few days or more. In his talk he shared with us how he has been doing this with Ansible + github + dropbox. 

Michael Battison, our next speaker gave us an introduction to Ansible – lighting talk for those who haven’t used the tool before – and what a great talk that was.

Mikey have been using Ansible for quite a while now and he thinks it is really simple, reliable and pretty easy to tackle.

According to Ansible in Depth (Whitepaper), ‘Ansible is designed to be minimal in nature, consistent, secure, and highly reliable, with an extremely low learning curve for administrators, developers, and IT managers’.

So how Ansible does the thing:

  • Ansible uses SSH to connect to hosts that makes it fast and agentless
  • It describe your environments using yaml
  • Ansible recommend using the os package manager on RHEL, centOS, fedora, debian, Ubuntu

 How do you make Ansible do the thing?

 Inventory file

  • Inventory files are how Ansible keeps track of how it’s connecting to whatever it’s connecting to.
  • These are super simple text files with IP addresses and hostnames.
  • You can use a different more dynamic system of inventory if you like (i.e. from a cloud provider).
  • You can group entries in the inventory file and then refer to those groups later (i.e. tell Ansible to run on all your webservers).

Vars

  • You can set variables in different scopes (you can set role)
  • Host level variable could be the http port of your web servers - that would be applied to the webserver group of hosts

Roles

  • Roles are an abstraction level above playbooks. they allow you to define smaller sets of tasks that make sense together and are generally for a specific purpose.
  • A webserver role, a database role, sometimes there are roles for different system (like nginx or mysql)

Ad-hoc

  • Ad-hoc tasks are things you will probably only run once.

Playbooks

  • Playbooks & roles are where the power lives! Ansible uses playbooks to run one or more “plays” on your systems. Playbooks can declare configurations but not only that; they can also orchestrate steps of any process ordered manually. By using Playbooks you tell Ansible what you want it to do with your systems, like pretty much everything else in Ansible, playbooks are expressed in yaml.

Ansible is proving popular as it is simple and efficient at the same time. Great job Mikey for explaining this to the Sydney Ansible Network! 

What do you think?

Is Ansible a perfectly viable alternative to Chef or a Puppet?

 

 

Great blog Zuzanna, we have found Ansible to be a very powerful and easy to use tool in our tool chain deploying AWS infrastructure. Definitely a solid alternative.

Like
Reply
Nafees Butt

Business Transformation | Operating Model Design | Strategic Alignment

9y

It definitely is Stephen. To be honest, i wasn't expecting technical details when i started reading it. Zuzanna appears to be a geeky version of an HR personnel (too bad i couldn't talk to her that evening).

Stephen Wallace

Beerops Co-Org, Devops Lead for Optus Business

9y

Certainly a lot of people having a look at it Zuzanna. Definitely one to keep an eye on. Good blog btw!

To view or add a comment, sign in

More articles by Zuzanna Neziri

  • 10/10

    End of the 2017 is fast approaching and the cliché New Year New Me is almost unavoidable. I want to share 10 principles…

    1 Comment
  • Sponsoring is not about making money

    You can’t have a community without connection - This is why face to face communication is such an important aspect of…

    5 Comments
  • Specialist DevOps Recruitment

    NC Group can assist you in finding the right people with the best mix of skills and cultural fit. NC Group qualifies…

  • Why are we scared to 'Live'?

    It can be trivial, I get that. Chill out, get your sh*t together, blah blah blah, take better care of yourself, just do…

    2 Comments
  • Automated Deployment of AEM using Animus

    Come and join us at the Breakout Session this Thursday @2pm at #AWSSummit in Sydney. David Cheal & Zack Levy will run a…

  • Strut @ AWS re:Invent 2016

    Strut Digital is currently in Las Vegas @ AWS re:Invent 2016; The team has already attended sessions on to catch up on…

    4 Comments
  • Meet Strut Digital at AWS Re:Invent 2016 in Las Vegas

    Amazon Web Services (AWS), the leading public cloud provider globally, loves to announce one new service after another…

  • Disruptors in Tech - Internet of Things (IoT) Meet Up

    The Internet of Things (IoT) changing the way businesses all over the world operate, grow and satisfy their customers…

  • Current Opportunities at STRUT Digital

    Strut Digital is an innovative DevOps and cloud consulting practice with a difference. We not only specialise in DevOps…

  • DevOps

    DevOps is a term created from the union of two words: development and operations. This 'Buzzword' seem to be understood…

    3 Comments

Insights from the community

Others also viewed

Explore topics