04.04.2020 Views

Mastering Ansible

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 1

At first glance, one might expect at least var_name and task_var_name to render

correctly. We can clearly see task_var_name being defined before its use. However,

armed with our knowledge that playbooks are parsed in their entirety before

execution, we know better:

As we can see, the only variable name that is properly rendered is var_name, as it

was defined as a static play variable.

Module transport and execution

Once a playbook is parsed and the hosts are determined, Ansible is ready to execute

a task. Tasks are made up of a name (optional, but please don't skip it), a module

reference, module arguments, and task control keywords. A later chapter will cover

task control keywords in detail, so we will only concern ourselves with the module

reference and arguments.

[ 21 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!