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
2e1b59a9
Commit
2e1b59a9
authored
Mar 13, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restructure the examples directory
parent
09a7119e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
6 deletions
+32
-6
examples/etc_ansible_hosts
+0
-0
examples/playbooks/handlers/handlers.yml
+0
-0
examples/playbooks/playbook.yml
+2
-2
examples/playbooks/playbook2.yml
+4
-4
examples/playbooks/playbook3.yml
+26
-0
examples/playbooks/tasks/base.yml
+0
-0
examples/playbooks/templates/foo.j2
+0
-0
examples/playbooks/vars/external_vars.yml
+0
-0
examples/scripts/uptime.py
+0
-0
No files found.
examples/hosts
→
examples/
etc_ansible_
hosts
View file @
2e1b59a9
File moved
examples/handlers.yml
→
examples/
playbooks/handlers/
handlers.yml
View file @
2e1b59a9
File moved
examples/playbook.yml
→
examples/playbook
s/playbook
.yml
View file @
2e1b59a9
...
...
@@ -42,7 +42,7 @@
# end of the playbook run
-
name
:
write some_random_foo configuration
action
:
template src=foo.j2 dest=/etc/some_random_foo.conf
action
:
template src=
templates/
foo.j2 dest=/etc/some_random_foo.conf
notify
:
-
restart apache
...
...
@@ -66,6 +66,6 @@
# is changed, and only then
-
name
:
restart apache
action
:
service httpd state=restarted
action
:
service
name=
httpd state=restarted
examples/playbook2.yml
→
examples/playbook
s/playbook
2.yml
View file @
2e1b59a9
...
...
@@ -16,7 +16,7 @@
# files but still keep the playbook in public source control
vars_files
:
-
external_vars.yml
-
vars/
external_vars.yml
# as with before, every play has a list of tasks in it
...
...
@@ -30,7 +30,7 @@
# or we can promote reuse and simplicity by including tasks
# from other files, for instance, to reuse common tasks
-
include
:
base.yml
-
include
:
tasks/
base.yml
# we could also have done something like:
# - include: wordpress.yml user=timmy
...
...
@@ -44,7 +44,7 @@
# and simpler recipes, you may wish to only have one
# handler file for all your plays and playbooks
-
include
:
handlers.yml
-
include
:
handlers
/handlers
.yml
# you can mix things that are directly in the file with things
# that are included. Order is executed as written, but only
...
...
@@ -75,7 +75,7 @@
vars
:
release
:
2.0
vars_files
:
-
external_vars.yml
-
vars/
external_vars.yml
# these all runs as the user 'mdehaan'. If there were any handlers
...
...
examples/playbooks/playbook3.yml
0 → 100644
View file @
2e1b59a9
---
# this is not so much an example playbook file as a playbook we sometimes use
# for testing. I have chosen to not comment this one so folks can get
# an idea of what a concise playbook can look like...
-
hosts
:
all
user
:
root
vars
:
http_port
:
80
max_clients
:
200
tasks
:
-
name
:
simulate long running op, wait for 45s, poll every 5
action
:
command /bin/sleep 15
async
:
45
poll
:
5
-
include
:
tasks/base.yml favcolor=blue
-
name
:
write the foo config file using vars set above
action
:
template src=foo.j2 dest=/etc/some_random_foo.conf
notify
:
-
restart apache
-
name
:
ensure apache is running
action
:
service name=httpd state=started
-
name
:
pointless test action
action
:
command /bin/echo {{ http_port }}
handlers
:
-
include
:
handlers/handlers.yml
examples/base.yml
→
examples/
playbooks/tasks/
base.yml
View file @
2e1b59a9
File moved
examples/foo.j2
→
examples/
playbooks/templates/
foo.j2
View file @
2e1b59a9
File moved
examples/external_vars.yml
→
examples/
playbooks/vars/
external_vars.yml
View file @
2e1b59a9
File moved
examples/uptime.py
→
examples/
scripts/
uptime.py
View file @
2e1b59a9
File moved
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