demo playlet - as a trial to work out bugs
This commit is contained in:
parent
2fe79b3f2d
commit
83c18a42fa
4 changed files with 52 additions and 0 deletions
36
playlets/README
Normal file
36
playlets/README
Normal file
|
@ -0,0 +1,36 @@
|
|||
playlets are self-contained playbooks which are never intended to be
|
||||
directly executed. They are only to be used as an 'include' from our other
|
||||
playbooks.
|
||||
|
||||
All of these playbooks must have:
|
||||
|
||||
|
||||
hosts: $parent_group
|
||||
|
||||
the general structure is:
|
||||
|
||||
playlet_name/
|
||||
vars/vars.yml
|
||||
files/myfile.conf
|
||||
myfile2.conf.j2
|
||||
handlers/handlers.yml
|
||||
book.yml
|
||||
|
||||
|
||||
|
||||
|
||||
template for book.yml
|
||||
---
|
||||
- name: give the play let a name
|
||||
hosts: $parent_group
|
||||
tags:
|
||||
- playlet_tag_name
|
||||
vars_files:
|
||||
- vars/somefile.yml
|
||||
|
||||
tasks:
|
||||
- name: my task
|
||||
action: stuff which I do
|
||||
|
||||
|
||||
|
12
playlets/test/book.yml
Normal file
12
playlets/test/book.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
- name: test playlet
|
||||
hosts: $parent_group
|
||||
tags:
|
||||
- playlet_tag_name
|
||||
vars_files:
|
||||
- vars/vars.yml
|
||||
|
||||
tasks:
|
||||
- name: my task 1
|
||||
action: copy src=files/${myfile}.txt dest=/tmp/${myfile}.txt
|
||||
|
2
playlets/test/files/foo
Normal file
2
playlets/test/files/foo
Normal file
|
@ -0,0 +1,2 @@
|
|||
this is foo
|
||||
it should end up in /tmp
|
2
playlets/test/vars/vars.yml
Normal file
2
playlets/test/vars/vars.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
myfile: foo
|
Loading…
Add table
Add a link
Reference in a new issue