Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
00c2c0b1
Commit
00c2c0b1
authored
Sep 29, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conditionals chapter and some misc tweaks elsewhere
parent
ddf51154
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
6 deletions
+25
-6
docsite/latest/rst/playbooks_delegation.rst
+18
-0
docsite/latest/rst/playbooks_environment.rst
+0
-0
docsite/latest/rst/playbooks_error_handling.rst
+0
-0
docsite/latest/rst/playbooks_tags.rst
+7
-6
No files found.
docsite/latest/rst/playbooks_delegation.rst
View file @
00c2c0b1
...
...
@@ -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
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
docsite/latest/rst/playbooks_environment.rst
View file @
00c2c0b1
This diff is collapsed.
Click to expand it.
docsite/latest/rst/playbooks_error_handling.rst
View file @
00c2c0b1
This diff is collapsed.
Click to expand it.
docsite/latest/rst/playbooks_tags.rst
View file @
00c2c0b1
Advanced Playbook
s
============
======
Conditional
s
============
Here are some advanced features of the playbooks language. Using all of these features
is not necessary, but many of them will prove useful. If a feature doesn't seem immediately
relevant, feel free to skip it. For many people, the features documented in `playbooks` will
be 90% or more of what they use in Ansible.
Often the result of a play may depend on the value of a variable, fact, or previous task result. In some cases,
the values of variables may depend on other variables. Further, additional groups can be created to manage hosts based on
whether the hosts match other criteria. There are many options to control execution flow in Ansible.
Let's dig into what they are.
.. contents::
:depth: 2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment