Support for loading recipes and roles from modules
Modules are located under `modules` folder. They will be copied on deploy as well. An example structure: ``` sample ├── files ├── install.sh ├── modules │ └── another │ ├── files │ ├── install.sh │ ├── README.md │ ├── recipes │ └── roles │ └── web.sh ├── README.md ├── recipes └── roles ``` Roles and recipes will be available for your project to access it with the commited functions
This commit is contained in:
14
kickstart/recipes/kickstart/module.sh
Normal file
14
kickstart/recipes/kickstart/module.sh
Normal file
@ -0,0 +1,14 @@
|
||||
kickstart.module.apply_role() {
|
||||
kickstart.module.apply_ $1 $2 roles
|
||||
}
|
||||
|
||||
kickstart.module.apply_recipe() {
|
||||
kickstart.module.apply_ $1 $2 recipes
|
||||
}
|
||||
|
||||
kickstart.module.apply_() {
|
||||
local cur_dir=`pwd`;
|
||||
cd modules/$1
|
||||
source $3/$2.sh
|
||||
cd $cur_dir
|
||||
}
|
Reference in New Issue
Block a user