In this video tutorial series on Learning Ansible, you will - unsurprisingly - learn how to use Ansible for a variety of common tasks.
Please note, this course covers Ansible 1.x. Ansible 2 is now available.
We will start with setting up an environment for practising with Ansible. You may have heard that Ansible allows you to run and re-run playbooks (think: a list of tasks to get something done, i.e. to install nginx) without having to worry about whether re-running a playbook will break your existing server setup.
That's kind of true - but to begin with, things never go that smoothly.
Once we have our training setup sorted, we can move on to the fun things that Ansible can offer us.
We'll cover (in no particular order):
- playbooks, tasks, and roles
- variables including group and host
- securely handling passwords with the Vault
- handling failures
- finding cool new things to play with via Ansible Galaxy
After we've covered off the fundamentals - of which you don't need to know them all to get started, I'm sure you will be relieved to know - we will move on to some real world examples.
This will include:
- how to configure a new server with all your favourite tools
- how to build a MySQL server ready for your shiny new database
- how to set up a Symfony site using nginx
Once you know the basics, you can begin to customise, tweak, and shape your own personal installs and builds.
The real power with Ansible - in my opinion - comes from two main points.
The first is being able to reliably recreate an environment exactly as it's currently running elsewhere, with one command. This is great for sharing development server setups with team members, removing the burden of having to know how to install and configure a technology stack you've never used before, and even quickly rebuilding servers after unexpected disasters.
The second is related to the first. It's that Ansible gives you the ability to experiment more quickly with new tech stacks, with less time spent with the often frustrating and time consuming build, and more time spent on the fun stuff - actually using that awesome new tech that all the blogs are talking about.