Difficulty: beginner
Estimated Time: 10-15 minutes

Ansible - simple IT automation

Ansible can be used to provision cloud resources, configure servers, run basic tests and perform deployments. It's easy to use and doesn't require complex installation procedure nor clutters your server with agents to do its job.

Learn how to use Ansible command-line interface to perform various tasks across a number of hosts in ad-hoc and structured manners


You have learned basics of Ansible usage and are ready to start exploring how Ansible playbooks can help you to perform complex configuration management or deployment activities.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Ansible Intro

Step 1 of 5

Step 1 - Execution

You can run Ansible in two different modes:

ad-hoc: perform one-off command on a single host or a group of hosts

structured: execute ansible playbook (script) that performs a number of predefined tasks on remote servers in a specific order

Try running ansible (ad-hoc mode) and you will notice that it expects host-pattern (names of servers to which you want to talk to) and additional options like the command that you want to execute:

Usage: ansible host-pattern [options]

Then run ansible-playbook (structured mode) which needs only the name of playbook as everything else can be defnied within the playbook:

Usage: ansible-playbook playbook.yml

We will start with the ad-hoc mode.