Skip to content

Commit

Permalink
Added templates to policy set and policy to deploy them
Browse files Browse the repository at this point in the history
  • Loading branch information
nickanderson committed Nov 22, 2021
1 parent 58e4f8b commit 140bea3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions cfbs.json
Expand Up @@ -11,6 +11,7 @@
"dependencies": ["autorun"],
"steps": [
"copy ./masterfiles/lib/scl/ lib/scl/",
"copy ./templates/ templates/scl/",
"copy ./masterfiles/services/autorun/scl.cf services/autorun/scl.cf",
"copy ./services/ services/scl/"
]
Expand Down
9 changes: 9 additions & 0 deletions masterfiles/services/autorun/scl.cf
Expand Up @@ -16,6 +16,8 @@ bundle agent scl_autorun {
"tags" slist => { "autorun" };

methods:
"" usebundle => scl_templates_installed(),
comment => "Make sure templates are present in $(sys.workdir)/templates";
"" usebundle => scl_inventory_modules(),
comment => "Which inventory module must be run, controlled via 'def.scl_inventory_modules'";
"" usebundle => scl_services_autorun(),
Expand All @@ -25,3 +27,10 @@ bundle agent scl_autorun {
verbose_mode::
"$(this.bundle): SCL lib loaded with node template dir: $(def.node_template_dir)";
}
bundle agent scl_templates_installed
{
files:
"$(sys.workdir)/templates/"
copy_from => local_dcp("$(sys.policy_entry_dirname)/templates/scl/"),
depth_search => recurse_with_base(inf);
}

0 comments on commit 140bea3

Please sign in to comment.