| 1 |
body common control |
| 2 |
# |
| 3 |
{ |
| 4 |
bundlesequence => { "classify", "map_role_bundles", "go" }; |
| 5 |
inputs => { @(map_role_bundles.inputs) }; |
| 6 |
} |
| 7 |
|
| 8 |
bundle common classify |
| 9 |
# |
| 10 |
{ |
| 11 |
vars: |
| 12 |
"variable" string => "any"; |
| 13 |
|
| 14 |
classes: |
| 15 |
"group_class_from_variable" |
| 16 |
expression => strcmp("$(variable)", "any"), |
| 17 |
comment => "Highest level classification, other classes depend on this."; |
| 18 |
|
| 19 |
"group_class_from_string" |
| 20 |
expression => strcmp("any", "any"), |
| 21 |
comment => "Highest level classification, other classes depend on this."; |
| 22 |
|
| 23 |
} |
| 24 |
|
| 25 |
bundle common map_role_bundles |
| 26 |
# |
| 27 |
{ |
| 28 |
vars: |
| 29 |
# Define bundles |
| 30 |
any:: |
| 31 |
"role[app00_zero]" |
| 32 |
string => "$(this.promise_dirname)/app00_zero.cf.sub", |
| 33 |
comment => |
| 34 |
"Roles are based on groups. Roles |
| 35 |
map to bundles. Bundles are defined in a specific file."; |
| 36 |
|
| 37 |
!any:: |
| 38 |
"role[app_zero]" |
| 39 |
string => "$(this.promise_dirname)/app_zero.cf.sub", |
| 40 |
comment => |
| 41 |
"Roles are based on groups. Roles |
| 42 |
map to bundles. Bundles are defined in a specific file."; |
| 43 |
|
| 44 |
group_class_from_variable:: |
| 45 |
"role[app_one]" |
| 46 |
string => "$(this.promise_dirname)/app_one.cf.sub", |
| 47 |
comment => |
| 48 |
"Roles are based on groups. Roles |
| 49 |
map to bundles. Bundles are defined in a specific file."; |
| 50 |
|
| 51 |
group_class_from_string:: |
| 52 |
"role[app_two]" string => "$(this.promise_dirname)/app_two.cf.sub"; |
| 53 |
|
| 54 |
any:: |
| 55 |
"bundles" slist => getindices(role); |
| 56 |
"inputs" slist => getvalues(role); |
| 57 |
} |
| 58 |
|
| 59 |
bundle agent go |
| 60 |
# |
| 61 |
{ |
| 62 |
vars: |
| 63 |
"bundles" slist => { @(map_role_bundles.bundles) }; |
| 64 |
"sorted_bundles" slist => sort(bundles, "lex"); |
| 65 |
|
| 66 |
methods: |
| 67 |
"$(sorted_bundles)" usebundle => $(sorted_bundles); |
| 68 |
} |