README updated to mention blocks
This commit is contained in:
parent
5f719d7ab8
commit
9d7ea81783
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -42,6 +42,16 @@ The following actions are supported:
|
|||
* `stop` stops processing the list of instructions for the current
|
||||
host.
|
||||
|
||||
In addition, the `block` can be used to repeat multiple instructions or make
|
||||
them obey a single conditional. The instruction must include a `block` field,
|
||||
containing the list of instructions which are part of the block. It may have
|
||||
a `rescue` field, containing a list of instructions which will be executed on
|
||||
error, and `always`, which may contain a list of instructions to execute in
|
||||
all cases. If the `locals` field is defined, it must contain a table of local
|
||||
variables to define. Any local variable defined by the instructions under
|
||||
`block`, `rescue` or `always` will go out of scope once the block finishes
|
||||
executing.
|
||||
|
||||
A somewhat silly example can be found in the `example` directory. Trying to
|
||||
execute it using `ansible-inventory --graph` results in the following output.
|
||||
|
||||
|
|
Loading…
Reference in a new issue