Conditionals chapter and some misc tweaks elsewhere

pull/4295/head
Michael DeHaan 11 years ago
parent ddf51154fd
commit 00c2c0b11c

@ -97,3 +97,21 @@ Here is an example::
Note that you must have passphrase-less SSH keys or an ssh-agent configured for this to work, otherwise rsync Note that you must have passphrase-less SSH keys or an ssh-agent configured for this to work, otherwise rsync
will need to ask for a passphrase. will need to ask for a passphrase.
Local Playbooks
```````````````
It may be useful to use a playbook locally, rather than by connecting over SSH. This can be useful
for assuring the configuration of a system by putting a playbook on a crontab. This may also be used
to run a playbook inside a OS installer, such as an Anaconda kickstart.
To run an entire playbook locally, just set the "hosts:" line to "hosts:127.0.0.1" and then run the playbook like so::
ansible-playbook playbook.yml --connection=local
Alternatively, a local connection can be used in a single playbook play, even if other plays in the playbook
use the default remote connection type::
- hosts: 127.0.0.1
connection: local

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,10 +1,11 @@
Advanced Playbooks Conditionals
================== ============
Here are some advanced features of the playbooks language. Using all of these features Often the result of a play may depend on the value of a variable, fact, or previous task result. In some cases,
is not necessary, but many of them will prove useful. If a feature doesn't seem immediately the values of variables may depend on other variables. Further, additional groups can be created to manage hosts based on
relevant, feel free to skip it. For many people, the features documented in `playbooks` will whether the hosts match other criteria. There are many options to control execution flow in Ansible.
be 90% or more of what they use in Ansible.
Let's dig into what they are.
.. contents:: .. contents::
:depth: 2 :depth: 2

Loading…
Cancel
Save