RousselTMLEARNING

TP · Ansible: from discovery to expertise

Setting up the test environment

What you will learn in this TP
  • Install VirtualBox and Vagrant
  • Clone the course repository
  • Create and start a test environment
  • Connect to the virtual machines
Mode :

All steps and instructions are shown. Recommended for this lab: guided

Oracle VM virtualbox #

Context. The whole Ansible course relies on identical test machines for every learner. You prepare, once and for all, this reproducible environment described in the course Git repository.

Prerequisites: VirtualBox and Vagrant installed, Git, 8 GB of free memory  ·  Estimated time: 20 min

We will use Virtualbox to deploy our test VMs. Some labs will be done on Docker, so if you already have a Docker engine, you can use it instead of deploying a new VM.

You must proceed with the installation of Virtualbox by following the procedure corresponding to your system:

https://www.virtualbox.org/wiki/Downloads

Hashicorp Vagrant #

We will use Vagrant to automatically deploy test environments. To learn more about Vagrant, you can follow our dedicated training.

You must proceed with the installation of Vagrant by following the procedure corresponding to your system:

https://developer.hashicorp.com/vagrant/install

From concept to expertise #

We have preconfigured a git repo for the training.

  1. Git repo

    You can use the command below to clone the repo:

    git clone https://github.com/RousselTM/ansible-formation.git
  2. Choice of environment

    The configurations for the test environments are located in the tp folder. In this folder there are several subfolders, each corresponding to a test environment: simple VM, VM with Docker, VM with application... Depending on the lab, we will specify which one to use:

    cd ansible-formation/tp/REP
  3. Environment creation

    Once in the folder corresponding to the desired environment, you can start the environment creation on Virtualbox with the following Vagrant command:

    vagrant up

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●○○○○ (1/5)

My progress

  • ⏱ Estimated time : ≈ 20 min

🧪 Launch the lab environment ↗

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Course Glossary

Ansible

An open source IT automation tool (IaC) enabling configuration management, application deployment, and orchestration, operating agentlessly via SSH.

Recommended Articles

Ansible: the inventory (static, dynamic, groups and variables)

Understand and master the Ansible inventory: INI and YAML files, groups, host and group variables...

Ansible: ad-hoc commands

Run immediate actions on a fleet of servers with ansible: the ping, command, shell, copy, apt, se...

Ansible: structuring your code with roles

Create, organize and reuse Ansible roles: directory layout, defaults, tasks, handlers, templates,...

Ansible: going further (testing, quality, CI/CD and performance)

Industrialize Ansible: ansible-lint, yamllint, Molecule, continuous integration, collections, exe...

Ansible: managing security (Vault, SSH, privileges and secrets)

Securing Ansible: Ansible Vault, SSH key authentication, become and sudo, no_log, hardening the c...

Ansible: driving your automations with a graphical interface (AWX, Semaphore, AAP)

Compare and install Ansible's graphical interfaces: AWX, Ansible Automation Platform, Semaphore a...

Ansible best practices: structure, idempotence, security and quality

Ansible best practices: project organization, naming, FQCN, idempotence, modules rather than shel...

Ansible: generating dynamic files with Jinja2 and facts

Create dynamic configuration files: Jinja2 templates, variables, facts, filters, loops, condition...

Ansible: managing your infrastructure with playbooks (Infrastructure as Code)

Write production playbooks: project structure, plays, handlers, tags, serial strategy, error hand...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!