A summary of the content covered in this chapter.

This chapter introduced the basic constructs of Ansible to get started with automating our configurations and state.

We looked into ad-hoc commands and how idempotence makes Ansible powerful. Ad-hoc commands provide a quick and easy way of executing tasks when using Ansible.

We explored some of its use cases:

  • Rebooting servers
  • Managing services
  • Managing files
  • Fact gathering
  • Connectivity testing

and some handy modules:

  • file
  • stat
  • copy
  • replace
  • Debug

The concepts of ad-hoc commands port over to Ansible playbook language.

Playbooks are the basis of configuration management, and orchestrated automation with Ansible. They are designed for automating repeatable tasks.

We introduced the contents of the playbook:

  • Hosts
  • Tasks
  • Variables

You created and ran your first essential playbook to connect to a remote server, a container, which mimics a ping module. We will cover more advanced examples in the upcoming chapters.

Get hands-on with 1000+ tech skills courses.