Merge pull request #3017 from sergevanginderachter/roles-script

Add roles support for the script module
This commit is contained in:
Michael DeHaan
2013-05-29 15:54:18 -07:00
3 changed files with 8 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ The top level of the directory would contain files and directories like so::
ntp.conf.j2 # <------- templates end in .j2
files/ #
bar.txt # <-- files for use with the copy resource
foo.sh # <-- script files for use with the script resource
webtier/ # same kind of structure as "common" was above, done for the webtier role
monitoring/ # ""

View File

@@ -488,6 +488,7 @@ This designates the following behaviors, for each role 'x':
- If roles/x/handlers/main.yml exists, handlers listed therein will be added to the play
- If roles/x/vars/main.yml exists, variables listed therein will be added to the play
- Any copy tasks can reference files in roles/x/files/ without having to path them relatively or absolutely
- Any script tasks can reference scripts in roles/x/files/ without having to path them relatively or absolutely
- Any template tasks can reference files in roles/x/templates/ without having to path them relatively or absolutely
If any files are not present, they are just ignored. So it's ok to not have a 'vars/' subdirectory for the role,
@@ -526,6 +527,8 @@ If you want to define certain tasks to happen before AND after roles are applied
- shell: echo 'hello'
roles:
- { role: some_role }
tasks:
- shell: echo 'still busy'
post_tasks:
- shell: echo 'goodbye'