Skip to content
Martin Kuba edited this page Sep 5, 2019 · 2 revisions

Ansible Best Practices for Perun Deployment

Terminology

The basic unit of work in Ansible is called a task, which is implemented by a module. There are many modules readily available (see list of all Ansible modules), the most used are:

  • debug - prints debug messages
  • assert - checks required conditions
  • file - creates, removes, detects; files, directories, symlinks, hardlinks
  • copy - copies a file
  • template - creates a file from a template by inserting values of variables
  • lineinfile - edits or creates a line in a text file
  • blockinfile - edits or creates a block of multiple lines in a text file
  • package - installs, upgrades or removes software packages
  • systemd - manages systemd services

A series of tasks performed to fulfill some purpose is called a role. Roles can be reused, a role should be kept in a separate git repository (with name prefixed with ansible-role-) and published in Ansible Galaxy. We have a few of them:

A collection of roles and tasks together with list of hosts is called a play. A set of plays is called a playbook.

Clone this wiki locally