How to list all resources of a certain type?
Can a Puppet-manifest (or an ERB-template) enumerate through _all_ defined resources of a particular type? For example, I want to list all of the Puppet-managed users -- can I list all of the...
View ArticleHow to use external file for template or inline_template function
Hi all, I have a puppet recipe who should download and extract an archive file which contain an ERB file. I would like to use this extracted resource as a base for a new file content resource. Do you...
View ArticleHandle Empty Arrays
I am completely stumped on this one.. I have a module like: class test ( $file, $list, ){ file { $file: ensure => 'file', content => epp('module/list.epp', {'list' => $list}), mode =>...
View ArticleWhere can I put files/templates where hiera can reference them?
(Sorry, I accidentally accepted the answer to my last question and it wasn't correct) Let's say I have a module "mymodule" which use a template to create /etc/mymodule.conf. I would like the user to...
View Articleruby code in template not working with Puppet 4.x anymore
I used following code to generate random orders of LDAP servers in client config file, it won't change the orders in next puppet agent run. However in Puppet v4+, it doesn't seem to work any more,...
View ArticleInclude a puppet-served file (not a subtemplate) in a template
Greetings. I've tried searching, but I'm probably searching for the wrong words. I have a module class foo { file { "/etc/foo.txt" : ensure => file, source => 'puppet:///modules/foo/foo.txt', }...
View ArticleEPP template : elseif condition ?
Hi dear puppeteers ! I was trying to implement some logic lately within an EPP template, and couldn't get an elsif **strong text**statement to work <% if $facts['os']['family'] == 'RedHat' {...
View ArticleTemplate generated html files with garbage chars
Hello, some years ago, we installed puppet on a dedicated virtual machine. It is used to manage a Windows server. One of it's tasks is to generate HTML files from templates (EPP). The problem is that...
View ArticleTemplate generated html files with garbage chars
Hello, some years ago, we installed puppet on a dedicated virtual machine. It is used to manage a Windows server. One of it's tasks is to generate HTML files from templates (EPP). The problem is that...
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 ArticleLocal variable in .ERB file works during first run but won't update if list...
Hi all, New here so forgive me if I'm asking something that has been asked. I looked around and could not find any information on it specifically. I'm building out an elasticsearch test cluster. When...
View ArticlePuppet unable to modify ISO format files
Scenario: we are managing few legacy applications using puppet. Where the properties file are in ISO-8859 format on which puppet is unable to perform any modification and throws error. E,g. while...
View Articleare quotes allowed with ?
i have a template with "<%= @fqdn %>" in it, as well as <%@ @ipaddress %>. the tag without the quotes works fine, but the tag with the quotes prints <%= @fqdn %> instead of the...
View Articlequestion regarding include -- need to have separate modules due to CIS...
Hello, Hoping folks here may have an answer for this. We are using puppet inside of Satellite via RedHat packaging (my previous experience is not with the Satellite layer). We have a module: class...
View ArticleHow do I template a large config file?
I'm working on my [first module](https://github.com/DarkMorford/puppet-cytube) to install the [CyTube](https://github.com/calzoneman/sync) node.js application. I'm starting to add parameters to the...
View Article