[Puppet Users] Issue with the puppetlabs-firewall module

2016-06-06 Thread triceras
Hi Team, During execution of the puppet agent I got the following error when applying the puppetlabs-firewall module: Error: /Stage[main]/Profile::Firewall::Purge_unmanaged/Resources[firewallchain]: Failed to generate additional resources using 'generate': Parameter name failed on

Re: [Puppet Users] Trigger apt-get update if packages are to be installed

2016-06-06 Thread Simon Weald
We currently use Debian's unattended-upgrades which will cause an apt-get update to be run at the same time (around 0500ish), however in this instance I made some changes to a manifest to pull in a new sources.list and then install packages from it - this the kind of scenario I'm attempting to

Re: [Puppet Users] Trigger apt-get update if packages are to be installed

2016-06-06 Thread Simon Weald
This is what we used to do, but I'm trying to get away from that for two reasons. Firstly, to my mind it kinda goes against how Puppet is supposed to work, and secondly we use Puppetboard for monitoring and an apt-get update is recorded as a change meaning that every run results in a change

Re: [Puppet Users] merge hashes and create_resources

2016-06-06 Thread Henrik Lindberg
On 06/06/16 15:52, Robert Poulson wrote: Dear Henrik, dear Luke, thank you to both of you! I use 4.x but like the second solution too. Went with the first one tho. Since then I realised that I'm actually using hashes of hashes... so hashes more like in a dictionary way. So the following:

Re: [Puppet Users] Debian Jessie Packages MIA

2016-06-06 Thread Melissa Stone
Hi David, I can't find any evidence we ever provided Puppet 3.x or MCollective packages for Debian Jessie. Are you sure they came from apt.puppetlabs.com? I know you can install puppet 3.7.2 from the main debian jessie repos, but that is a package provided by the debian maintainers, not

Re: [Puppet Users] how to escape %{ in hiera

2016-06-06 Thread Simon
Hi Rob, That worked perfectly thanks!! On Monday, June 6, 2016 at 3:28:24 PM UTC+1, Rob Nelson wrote: > > Literal works when there is only one literal percent sign; last I checked, > you cannot use it twice in the same value. You can use "%%{::}{::hostname}" > to return "%{::hostname}" - the

Re: [Puppet Users] Trigger apt-get update if packages are to be installed

2016-06-06 Thread Christopher Wood
Back when I was doing this on Debian/Ubuntu I ended up doing the apt-get update on every agent run. This didn't stress the apt proxy (far from it) and made sure the agent had an up to date view of apt every time no matter what. This would also cover if somebody uses ensure=>latest or

Re: [Puppet Users] Trigger apt-get update if packages are to be installed

2016-06-06 Thread Matt Zagrabelny
On Mon, Jun 6, 2016 at 9:46 AM, Simon Weald wrote: > Hi everyone > > I've got a little bit of an issue which I'm currently fighting with. At the > moment, we pass an array of packages to be installed to the package > resource, however I need to call an apt-get update prior

[Puppet Users] Trigger apt-get update if packages are to be installed

2016-06-06 Thread Simon Weald
Hi everyone I've got a little bit of an issue which I'm currently fighting with. At the moment, we pass an array of packages to be installed to the package resource, however I need to call an apt-get update prior to the package installation (in case we add a new repo etc). My snippet below

Re: [Puppet Users] how to escape %{ in hiera

2016-06-06 Thread Rob Nelson
Literal works when there is only one literal percent sign; last I checked, you cannot use it twice in the same value. You can use "%%{::}{::hostname}" to return "%{::hostname}" - the middle "%{::}" returns nothing and splits the first percent from the variable name at the end, preventing

[Puppet Users] Re: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class

2016-06-06 Thread jcbollinger
> > > I ran 'puppet module list' and got the following. > /etc/puppet/environments/production/modules > [...] And are you certain that node server01 is in the 'production' environment? That is the default, but you do mention that you have at least one other. Does file

Re: [Puppet Users] merge hashes and create_resources

2016-06-06 Thread Robert Poulson
Dear Henrik, dear Luke, thank you to both of you! I use 4.x but like the second solution too. Went with the first one tho. Since then I realised that I'm actually using hashes of hashes... so hashes more like in a dictionary way. So the following: $input_base => { input1 => { 'port' =>

[Puppet Users] Re: Hiera, define, class, putting all together

2016-06-06 Thread jcbollinger
On Saturday, June 4, 2016 at 7:20:19 PM UTC-5, Helmut Schneider wrote: > > Hi, > > I'm new to puppet and read docs as much as possible, so forgive some > confusion in my code. > > [...] > nodes/xyz.yaml: > packages: > - postfix > - wget > apacheModules: > - mpm_prefork > -

Re: [Puppet Users] how to escape %{ in hiera

2016-06-06 Thread Christopher Wood
I ran into this too, use the literal function. $ grep -rh literal hieradata/ testing::cwood1::param3: "%{literal('%')}{::hostname}" testing::cwood1::param3: "%{literal('%')}{::hostname}" https://docs.puppet.com/hiera/3.1/variables.html#the-literal-lookup-function On Mon, Jun 06, 2016 at

[Puppet Users] how to escape %{ in hiera

2016-06-06 Thread Simon
Hi all does anyone know how i can escape %{ in hiera without it trying to convert to variable? i want to add the following to configure a syslog filter for logstash match => { "message" => "<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname}

Re: [Puppet Users] merge hashes and create_resources

2016-06-06 Thread Luke Bigum
In Puppet 3.x you have to use the Define Wrapper "trick". It's not pretty, but without lambda functions it's all that you've got. If it's 4.x, see Henrik's post before. $input_base => { input1 => { 'port' => '2001', 'component' => 'component1' }, input2 => { 'port' => '2002', 'component'