Ansible for IT Tasks Automation

What is Ansible?

Ansible is a practical and easy IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT tasks and processes(Red Hat Ansible, n.d.).

Why use Ansible?

  • Ansible is Simple
    • Human readable automation
    • No special coding skills needed
    • Tasks executed in order
    • Usable by every team
    • Get productive quickly
  • Ansible is agentless
    • saves time on deployment or migration
    • Agentless architecture
    • uses OpenSSH & WinRM
    • No agents to exploit or update
    • Get started immediately
    • More efficient & more secure
  • Ansible uses YAML
    • App deployment
    • Configuration management
    • workflow orchestration
    • Network automation
    • Orchestrate the app lifecycle

How does Ansible Work?

  • Install Ansible
  • Identify your infrastructure pain points
  • Utilize human-readable YAML
  • Create playbooks to ensure applications are configured and described adequately
    • Playbooks are Ansible’s configuration, deployment and orchestration language.
    • Tasks are executed sequentially by invoking Ansible modules through playbooks written in YAML
    • Modules are tools in the toolkit that are written in programming languages such as Python, extending Ansible simplicity to the entire stack.
    • Plugins are gears in the engine that are supported by the core engine and add adaptability for various use cases and platforms
    • Inventories are lists of systems, hosts, groups, inventory-specific data (variables) or static/dynamic sources in your infrastructures that automation is executed against
    • Can be on-premise or cloud-hosted platforms
    • Use version control for tracking changes in playbooks configurations
    • Monitor and capture server inventories, details, logs,
  • Orchestration with other tools such as Puppet, Jenkins, SALT, etc. to homogenize existing environments by leveraging current toolsets and update mechanisms.

Sample Ad-Hoc Ansible Commands

# check all my inventory hosts are ready to be managed by Ansible
> ansible all -m ping

# run the uptime command on all hosts in the web group
> ansible web -m command -a "uptime"

# collect and display the discovered setup for the localhost
> ansible localhost -m setup 


Red Hat Ansible. (n.d.). How Ansible Works.

Red Hat Ansible Automation (2021). Getting Started with Ansible [Video]. YouTube.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s