July 2017
Intermediate to advanced
266 pages
6h 36m
English
In the previous section, we talked primarily about Ansible plays. Underneath a given play is a set of Ansible tasks. Ansible tasks can perform numerous actions on a local or target system. This includes installing packages (such as apt, yum, and opencsw), copying files, starting services, and much, much more. Ansible tasks make up the glue that binds automation and human-readable actions. Let's take a look at the elements of the Ansible tasks section and see how to write them:
tasks: - name: <some description> <API>: PARAM1=foo PARAM2=foo PARAM3=foo
This snippet is pretty simplistic; there is a single play (notated by tasks:) and a single task underneath the play. Within the task itself, the name parameter has (in plain English) ...
Read now
Unlock full access