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
6b5605c4
Commit
6b5605c4
authored
Jun 09, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11208 from tgerla/multiple-plays-docs
add an example of multiple plays in a single playbook
parents
8e3213a9
597d3a5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
docsite/rst/playbooks_intro.rst
+27
-0
No files found.
docsite/rst/playbooks_intro.rst
View file @
6b5605c4
...
@@ -106,6 +106,33 @@ YAML dictionaries to supply the modules with their key=value arguments.::
...
@@ -106,6 +106,33 @@ YAML dictionaries to supply the modules with their key=value arguments.::
name
:
httpd
name
:
httpd
state
:
restarted
state
:
restarted
Playbooks
can
contain
multiple
plays
.
You
may
have
a
playbook
that
targets
first
the
web
servers
,
and
then
the
database
servers
.
For
example
::
---
-
hosts
:
webservers
remote_user
:
root
tasks
:
-
name
:
ensure
apache
is
at
the
latest
version
yum
:
pkg
=
httpd
state
=
latest
-
name
:
write
the
apache
config
file
template
:
src
=/
srv
/
httpd
.
j2
dest
=/
etc
/
httpd
.
conf
-
hosts
:
databases
remote_user
:
root
tasks
:
-
name
:
ensure
postgresql
is
at
the
latest
version
yum
:
name
=
postgresql
state
=
latest
-
name
:
ensure
that
postgresql
is
started
service
:
name
=
postgresql
state
=
running
You
can
use
this
method
to
switch
between
the
host
group
you
're targeting,
the username logging into the remote servers, whether to sudo or not, and so
forth. Plays, like tasks, run in the order specified in the playbook: top to
bottom.
Below, we'
ll
break
down
what
the
various
features
of
the
playbook
language
are
.
Below, we'
ll
break
down
what
the
various
features
of
the
playbook
language
are
.
..
_playbook_basics
:
..
_playbook_basics
:
...
...
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