mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Legacy variable removal.
This commit is contained in:
parent
9caef884e1
commit
ce89382473
2 changed files with 7 additions and 4 deletions
|
@ -172,8 +172,7 @@ Lookup Plugin
|
||||||
|
|
||||||
A lookup plugin is a way to get data into Ansible from the outside world. These are how such things as "with_items" are implemented, which is a
|
A lookup plugin is a way to get data into Ansible from the outside world. These are how such things as "with_items" are implemented, which is a
|
||||||
basic looping plugin, but there are also things like "with_file" which loads data from a file, and even things for querying environment variables,
|
basic looping plugin, but there are also things like "with_file" which loads data from a file, and even things for querying environment variables,
|
||||||
DNS text records, or key value stores. Lookup plugins can also be accessed in templates using an all caps form, such as the contents of a file
|
DNS text records, or key value stores. Lookup plugins can also be accessed in templates as ``{{ lookup('file','/path/to/file') }}``.
|
||||||
on the local machine can be accessed like ``$FILE(/path/to/file)``.
|
|
||||||
|
|
||||||
Multi-Tier
|
Multi-Tier
|
||||||
++++++++++
|
++++++++++
|
||||||
|
@ -250,7 +249,7 @@ Local Action
|
||||||
++++++++++++
|
++++++++++++
|
||||||
|
|
||||||
A local_action directive in a playbook targetting remote machines means that the given step will actually occur on local
|
A local_action directive in a playbook targetting remote machines means that the given step will actually occur on local
|
||||||
machine, but that the variable '$ansible_hostname' can be passed in to reference the remote hostname being referred to in
|
machine, but that the variable '{{ ansible_hostname }}' can be passed in to reference the remote hostname being referred to in
|
||||||
that step. This can be used to trigger, for example, an rsync operation.
|
that step. This can be used to trigger, for example, an rsync operation.
|
||||||
|
|
||||||
Loops
|
Loops
|
||||||
|
|
|
@ -433,7 +433,6 @@ Note that you cannot do variable substitution when including one playbook
|
||||||
inside another.
|
inside another.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
You can not conditionally path the location to an include file,
|
You can not conditionally path the location to an include file,
|
||||||
like you can with 'vars_files'. If you find yourself needing to do
|
like you can with 'vars_files'. If you find yourself needing to do
|
||||||
this, consider how you can restructure your playbook to be more
|
this, consider how you can restructure your playbook to be more
|
||||||
|
@ -541,6 +540,11 @@ If you want to define certain tasks to happen before AND after roles are applied
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- shell: echo 'goodbye'
|
- shell: echo 'goodbye'
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
If you are using tags with tasks (described later as a means of only running part of a playbook)
|
||||||
|
be sure you also tag your pre_tasks and post_tasks and pass those along as well, especially if the pre
|
||||||
|
and post tasks are used for monitoring outage window control or load balancing.
|
||||||
|
|
||||||
Executing A Playbook
|
Executing A Playbook
|
||||||
````````````````````
|
````````````````````
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue