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
6d0fd2bf
Commit
6d0fd2bf
authored
Feb 05, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compress the playbook format for readability
parent
b053df41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
examples/playbook.yml
+8
-14
lib/ansible/playbook.py
+2
-1
No files found.
examples/playbook.yml
View file @
6d0fd2bf
-
pattern
:
'
*'
-
pattern
:
'
*'
tasks
:
tasks
:
-
do
:
-
do
:
-
copy a file
-
copy
-
[
"
/srv/a"
,
"
/srv/b"
]
-
do
:
-
configure template & module variables
-
configure template & module variables
-
setup
-
[
setup
,
[
"
a=2"
,
"
b=3"
,
"
c=4"
]
]
-
[
"
a=2"
,
"
b=3"
,
"
c=4"
]
-
do
:
-
copy a file
-
[
copy
,
[
"
/srv/a"
,
"
/srv/b"
]
]
-
do
:
-
do
:
-
template from local file template.j2 to remote location /srv/file.out
-
template from local file template.j2 to remote location /srv/file.out
-
template
-
[
template
,
[
'
/srv/template.j2'
,
'
/srv/file.out'
]
]
-
[
'
/srv/template.j2'
,
'
/srv/file.out'
]
-
do
:
-
do
:
-
update apache
-
update apache
-
command
-
[
command
,
[
/usr/bin/yum
,
update
,
apache
]
]
-
[
/usr/bin/yum
,
update
,
apache
]
onchange
:
onchange
:
-
do
:
-
do
:
-
restart apache
-
restart apache
-
command
-
[
command
,
[
/sbin/service
,
apache
,
restart
]
]
-
[
/sbin/service
,
apache
,
restart
]
-
do
:
-
do
:
-
run bin
false
-
run bin
false
-
command
-
[
command
,
[
/bin/false
]
]
-
[
/bin/false
]
lib/ansible/playbook.py
View file @
6d0fd2bf
...
@@ -110,7 +110,8 @@ class PlayBook(object):
...
@@ -110,7 +110,8 @@ class PlayBook(object):
host_list
=
self
.
host_list
host_list
=
self
.
host_list
instructions
=
task
[
'do'
]
instructions
=
task
[
'do'
]
(
comment
,
module_name
,
module_args
)
=
instructions
(
comment
,
module_details
)
=
instructions
(
module_name
,
module_args
)
=
module_details
namestr
=
"
%
s/
%
s"
%
(
pattern
,
comment
)
namestr
=
"
%
s/
%
s"
%
(
pattern
,
comment
)
if
conditional
:
if
conditional
:
...
...
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