Value from hiera nested hash in erb template
Hi there, I have the following: --- foo: bar01: someval: foovalue bar02: someval: barvalue Now, I want to request the value of "foo::bar01::someval" and put it in a puppet erb template. eg. The first...
View ArticleQuery on template multiple conditions
Hi, Is it possible for templates to have multiple if and/or statements. It seems to work ok for 2, however any more than this and it does not seem to work correctly. Details: Works for <% if...
View Articlepuppet variables not coming through in template?
Here is a simple test case that shows what I am trying to do. I have a hash passed in through hiera and I want to apply a different template to generate a different file for each key. However the...
View ArticleManaging a single template from multiple modules
Hi there, I have some situations where I need to manage a single file and possibly even single value in that file. ie. limits.conf. You have the one config: /etc/security/limits.conf And even one...
View ArticleIgnore literal special characters in template
I'm working on templatizing a postgres conf file that has a literal line like this log_line_prefix = '<%u %%%d %%%t %r>' that gets interpreted as ERB code because of the `<%`. A syntax check...
View ArticleHow to escape special characters in template
I've got a file that needs the following content verbatim (the $ should be in the file, not interpreted). $pbsserver foo.localdomain I've made a template like so \$pbsserver <%= @fqdn %> Yet,...
View ArticleERP Template / List of all Cronjobs defined by Puppet
Hi, i would make a TXT/ ERP - Template file on every Puppet-Agent, where i documented the createt Cronjobs. I need the ensure; timeintervall; command in this template. This file should be exportet and...
View ArticleCross Module Config
Hi, I created a module for snmp with a template. Now, I have a second module for Hardware RAID Servers. It installs the RAID Controller Utility and it SHOULD also set up monitoring. For that, I need...
View ArticleHow do I access merged hiera data directly from a template?
I have hiera data that is being merged in via 3 different levels: :hierarchy: - name/hostname - class/hostclass - global and when I use a hiera_hash to extract the merged data in my module, it works...
View Articlecomposition nodes of the parts of the module
hi there I want to describe the module in the node "solve" any part of this module will "work": class myclass { service {...} file {... content => template (blabla.erb), ...} package {...} }...
View Articlesyntax error unexpected kend expecting $end
Hi, I am getting this error with the below syntax, any idea what I need to do to get this working? The ruby I believe seems ok. Details: <% if definition == "someserver" -%> $ModLoad...
View ArticleArray data use within a template
I have taken the NRPE plugin (for Nagios) from the puppet forge and tweaked it in order to get it to work for NCPA as well as NRPE. Without getting too much into it, they went from an include directory...
View ArticleAccessing resource collector from template
I'm using puppet to deploy haproxy configurations and SSL keys/certificates. I'm trying to use puppet's knowledge about the deployed keyfiles to automatically generate parts of the haproxy...
View Articlewant to be able to put the raw erb file on the client host as well as...
We don't want to give our developers access to our puppet manifests/erb templates as of yet, but we want to be able to put the erb code onto the development box as well as how the erb is interpreted....
View Article2 users 1 template
I have a module which defines a few users, each of whom have slightly different needs (e.g., home directory, uid, gid, groups, etc.). I'll use netatalk as an example, since we're using it for...
View Articleinstallation dealing with interactive questions - template - vfabric webserver
Trying to puppetize (open source edition) the vfabric webserver installation. The command for the install is ./newserver --server=tcweb --rootdir=/opt/vfabric-web-server...
View ArticleHow to declare a selectable hash class parameter?
Salut, I need a selectable hash parameter in my class definition: class colors ( $flavor = 'myfavorites', $nice_colors = $flavor ? { 'myfavorites' => { 'red' => false, 'green' => true, 'blue'...
View ArticleHow to render a specific template (file resource) for a specific client?
What's the puppet agent command to see how a file resource would be rendered for a specific machine (w/o actually applying it --noop but seeing the diff)? Does this resource have to be in the catalog...
View ArticleLookup destination path of a file in a template.
Is it possible to determine the destination path while a template's being rendered?file { 'my_cool_file': path => '/etc/somewhere', content => template('coolmodule/coolfile.erb'), } file {...
View ArticleHow to make erb templates strip out carriage return characters
I'm working on Windows (using VMs) and I added some `.sh` scripts to provision, but they are all written with carriage return characters, which apparently really confuse bash, so when I try to run them...
View Article