-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Martin Kuba edited this page Sep 5, 2019
·
2 revisions
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:
- role cesnet.itfg_cas in repo https://github.com/CESNET/ansible-role-igtf-cas
- role cesnet.apache_tls in repo https://github.com/CESNET/ansible-role-apache-tls
- role cesnet.metacentrum_monitoring in repo https://github.com/CESNET/ansible-role-metacentrum-monitoring
- role cesnet.unattended_upgrades in repo https://github.com/CESNET/ansible-role-unattended-upgrades
A collection of roles and tasks together with list of hosts is called a play. A set of plays is called a playbook.