puppet - Using defined type to build array? -
I currently have a class that looks like this:
class mymodule ($ Files = [],) {File {'/ my / file': Ensure = & gt; File, content = & gt; Template (mymodule / mytemplate.erb)}} and one template:
files: & lt;% @ files.each do | File | -% & gt; - & lt;% = file% & gt; & Lt;% end -% & gt; I would like to move the files parameter to my definition so that I can add the square closer to the base more easily and the differen't files are close Can be defined by Like node definitions:
mymodule :: file {'/ my / file':} mymodule :: file {'/ my / other_file':} < What is a good way to go about creating a files array using P> defined types?
Using templates is very difficult to obtain. By using the
Conkat module
module, you can create your file in conjunction with the closure of the wise snippets.
class mymodule {concat {'/ my / file': make sure = & gt; Current}} defined mymodule :: file ($ content) {concat :: fragment {target = & gt; '/ My / file', content = & gt; $ Content, order = & gt; '50',}} diamond
If you can move your resources to the diamond with the construction of create_resources , then you Develop resource titles and them in your template by trilaterally.
Comments
Post a Comment