[Puppet Users] PuppetDB failing to start up with bizarre complaint

2019-05-22 Thread Peter Berghold
Using the puppetlabs/puppetdb module to manage PuppetDB I'm seeing way to
much red text and PuppetDB is not "refreshing" meaning restarting. It is
failing with an error message
 java.lang.IllegalArgumentException: Specified bootstrap config file does
not exist: '/etc/puppetlabs/puppetdb/bootstrap.cfg'

and yet the file is really there and contains:

# This file is used by the application framework (trapperkeeper) to
# determine what services should be loaded at boot time.
# For more info, see:
#  https://github.com/puppetlabs/trapperkeeper/wiki/Bootstrapping

# Web Server
puppetlabs.trapperkeeper.services.webserver.jetty9-service/jetty9-service

# Webrouting
puppetlabs.trapperkeeper.services.webrouting.webrouting-service/webrouting-service

# TK status
puppetlabs.trapperkeeper.services.metrics.metrics-service/metrics-webservice
puppetlabs.trapperkeeper.services.status.status-service/status-service
puppetlabs.trapperkeeper.services.scheduler.scheduler-service/scheduler-service

# PuppetDB Services
puppetlabs.puppetdb.cli.services/puppetdb-service
puppetlabs.puppetdb.command/command-service
puppetlabs.puppetdb.pdb-routing/maint-mode-service
puppetlabs.puppetdb.pdb-routing/pdb-routing-service
puppetlabs.puppetdb.config/config-service

# NREPL
puppetlabs.trapperkeeper.services.nrepl.nrepl-service/nrepl-service

# Dashboard redirect: remove to disable
puppetlabs.puppetdb.dashboard/dashboard-redirect-service

so... what is really going on here?
-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3_t0401gqSe8WQPQgRM_LU8SjV2DEjxM3GnF4PMnFAoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] class invocation conflicts

2019-05-21 Thread Peter Berghold
Using include instead of class makes sense to me and was my instinctive
thought.

Why on earth, then, do all the (or most) of the Puppet Forge modules use
the

class{'myclass':
param1 => 'thing'
}

patterns in their examples.  I had begun to believe that was the preferred
pattern.

I will mend my ways.

On Mon, May 20, 2019 at 3:33 PM Henrik Lindberg 
wrote:

> On 2019-05-20 18:57, Peter Berghold wrote:
> > So here I am I have a base profile for my Ubuntu (Debian family)
> > machines that invokes the class
> >
> > class{'apt':
> >  ... some paramters
> > }
> >
> > I then invoke the class
> >
> > class{'postgresql': }
> >
> > and now Puppet is screaming that the class 'apt' cannot be invoked
> > twice.   This seems to be a flaw in Puppet manifests to me.  How to fix?
> >
> >
>
> The best practice is to not use the resource like `class { name: ... }`
> syntax to declare a class and instead use `include name` and letting all
> parameter values come from hiera via automatic parameter lookup.
>
> That way, you can include the class as many times as you like - as the
> parameters are the same every time. Unfortunately, the compiler cannot
> do the same when classes are declared with parameters even if all places
> this is done use the exact same values.
>
> While it is possible to have a single `class { name: ... }` declaration
> with subsequent `include name` declarations, the opposite does not work.
>
> Hope this helps.
> - henrik
>
> > --
> >
> > Peter L. Berghold salty.cowd...@gmail.com  salty.cowd...@gmail.com>
> >
> > http://devops.berghold.net
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to puppet-users+unsubscr...@googlegroups.com
> > <mailto:puppet-users+unsubscr...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/puppet-users/CAArvnv2Ya1Vo1R%3D%2B3YW%3DMp%2BubL%2BZR_WFG1J4o_7OKe33tfm4vw%40mail.gmail.com
> > <
> https://groups.google.com/d/msgid/puppet-users/CAArvnv2Ya1Vo1R%3D%2B3YW%3DMp%2BubL%2BZR_WFG1J4o_7OKe33tfm4vw%40mail.gmail.com?utm_medium=email_source=footer
> >.
> > For more options, visit https://groups.google.com/d/optout.
>
>
> --
>
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/qbuve5%246tlm%241%40blaine.gmane.org
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3dQ-t2W_0%2BNpq0qD9%2BkHAnsLXfwJtJQHxJURywdb7wZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] class invocation conflicts

2019-05-20 Thread Peter Berghold
So here I am I have a base profile for my Ubuntu (Debian family) machines
that invokes the class

class{'apt':
... some paramters
}

I then invoke the class

class{'postgresql': }

and now Puppet is screaming that the class 'apt' cannot be invoked twice.
 This seems to be a flaw in Puppet manifests to me.  How to fix?


-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2Ya1Vo1R%3D%2B3YW%3DMp%2BubL%2BZR_WFG1J4o_7OKe33tfm4vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet apt repository broken?

2019-05-16 Thread Peter Berghold
After 30+ years in the IT industry I'd have to say "stuff happens."

Thanks for giving it attention

On Wed, May 15, 2019 at 5:06 PM Morgan Rhodes  wrote:

> The bionic repo should be working again. Let us know if you have any more
> issues.
>
> On Wed, May 15, 2019 at 1:45 PM Morgan Rhodes  wrote:
>
>> Hi Peter,
>>
>> Apologies, we've been having some repo issues today. I'm getting the
>> bionic repository updated now and it should be done within the hour. I will
>> send another update here when it completes.
>>
>> On Wed, May 15, 2019 at 1:43 PM Peter Berghold 
>> wrote:
>>
>>> Just this afternoon around 4PM I started noticing this happen in my
>>> Docker builds that incorporate loading the Puppet agent:
>>> W: Skipping acquire of configured file 'puppet/binary-all/Packages' as
>>> repository 'http://apt.puppetlabs.com bionic InRelease' doesn't have
>>> the component 'puppet' (component misspelt in sources.list?)
>>> W: Skipping acquire of configured file 'puppet/binary-amd64/Packages' as
>>> repository 'http://apt.puppetlabs.com bionic InRelease' doesn't have
>>> the component 'puppet' (component misspelt in sources.list?)
>>> Reading package lists...
>>> Building dependency tree...
>>> Reading state information...
>>> Package puppet-agent is not available, but is referred to by another
>>> package.
>>> This may mean that the package is missing, has been obsoleted, or
>>> is only available from another source
>>>
>>> E: Package 'puppet-agent' has no installation candidate
>>>
>>> same Docker build worked swimmingly earlier today and seems broken now
>>> with NOTHING changing in the build (except to add NTP).  Any idea why this
>>> is happening and more importantly any idea when the issue will go away?
>>>
>>>
>>>
>>> --
>>>
>>> Peter L. Berghold   salty.cowd...@gmail.com
>>>
>>> http://devops.berghold.net
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/puppet-users/CAArvnv0TA-u%2BxM-8wxrQ9b8FOJ9ZCn_%3DBRR2bqjaimXSZm0jGQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv0TA-u%2BxM-8wxrQ9b8FOJ9ZCn_%3DBRR2bqjaimXSZm0jGQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Morgan Rhodes
>> Release Engineering
>> mor...@puppet.com
>>
>
>
> --
> Morgan Rhodes
> Release Engineering
> mor...@puppet.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CA%2BFnDv05WW0i2z5sP7q0LyX65_TBR%3DiDOJYNddh%3DCAuxnaXVfA%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CA%2BFnDv05WW0i2z5sP7q0LyX65_TBR%3DiDOJYNddh%3DCAuxnaXVfA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1-QMhHU-9-skuWcqwAfwxECEDgze95hPLkYJHQTt_Kxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet apt repository broken?

2019-05-15 Thread Peter Berghold
Just this afternoon around 4PM I started noticing this happen in my Docker
builds that incorporate loading the Puppet agent:
W: Skipping acquire of configured file 'puppet/binary-all/Packages' as
repository 'http://apt.puppetlabs.com bionic InRelease' doesn't have the
component 'puppet' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'puppet/binary-amd64/Packages' as
repository 'http://apt.puppetlabs.com bionic InRelease' doesn't have the
component 'puppet' (component misspelt in sources.list?)
Reading package lists...
Building dependency tree...
Reading state information...
Package puppet-agent is not available, but is referred to by another
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'puppet-agent' has no installation candidate

same Docker build worked swimmingly earlier today and seems broken now with
NOTHING changing in the build (except to add NTP).  Any idea why this is
happening and more importantly any idea when the issue will go away?



-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0TA-u%2BxM-8wxrQ9b8FOJ9ZCn_%3DBRR2bqjaimXSZm0jGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] eyaml edit ending strangly

2019-04-30 Thread Peter Berghold
OK... found one problem and have another.  I am trying to encrypt a OpenSSL
private key and of course it is multiline.

Found out that I was specifiying PKS7 at the beginning of the block and was
supposed to specify PKCS7 instead.  Old eyes I guess.

Corrected that and not have something that looks sorta like:
mykeyhere: PKCS7[
- key start -
... body of key...
...with many...
lines
 key end 
]!
but when I end the edit I see:
[hiera-eyaml-core] nested asn1 error

I seem to remember I have to do something special with multiline values in
yaml/eyaml...  but I don't remember what.


On Tue, Apr 30, 2019 at 3:16 PM Robert  wrote:

> Hi,
>
> it's probably a copy error but
>
> [hiera-eyaml-core] cannot load such file --
> hiera/backend/eyaml/encryptors/pk*s7*
>
>
> vs.
>
> hiera/backend/eyaml/encryptors/pk*cs7*.rb
>
>
> You don't have a typo in some config, do you?
>
> Best
> Rp
>
> On Mon, Apr 29, 2019 at 10:42 PM Peter Berghold 
> wrote:
>
>> I had installed hiera-eyaml on my development box.  My home laptop is set
>> up the same way (I think) and the error I'm seeing doesn't happen on that
>> box.
>>
>> When I end he edit session I'm getting:
>>
>> /usr/bin/eyaml edit common.eyaml
>> [hiera-eyaml-core] cannot load such file --
>> hiera/backend/eyaml/encryptors/pks7
>>
>> and losing my edits
>>
>> Looking through the system I find a directory:
>>
>>
>> /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-3.0.0/lib/hiera/backend
>>
>> Diggin
>> deeper:/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-3.0.0/lib/hiera/backend/eyaml/encryptors/pkcs7.rb
>>
>> and more interestingly
>> /usr/lib/ruby/vendor_ruby/hiera/backend/eyaml/encryptors/pkcs7.rb
>>
>> so... anybody have an idea why I'm seeing the error above?
>>
>>
>> -
>>
>> Peter L. Berghold   salty.cowd...@gmail.com
>>
>> http://devops.berghold.net
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAArvnv0U%3D%3DtzdN6Gq0dy6K6oRHONRpqKfzkXTZkTqHMWP_LX4w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv0U%3D%3DtzdN6Gq0dy6K6oRHONRpqKfzkXTZkTqHMWP_LX4w%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CANwwCtxN-zN_SX6PhBC2%3DkqjMnEgAeT7kUg3-%2BHwLrfYWaxQig%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CANwwCtxN-zN_SX6PhBC2%3DkqjMnEgAeT7kUg3-%2BHwLrfYWaxQig%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv15Gdmb941KsaQVRSaRKDP%2B3YJTtbitzAHxFM0_8bOsrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] eyaml edit ending strangly

2019-04-29 Thread Peter Berghold
I had installed hiera-eyaml on my development box.  My home laptop is set
up the same way (I think) and the error I'm seeing doesn't happen on that
box.

When I end he edit session I'm getting:

/usr/bin/eyaml edit common.eyaml
[hiera-eyaml-core] cannot load such file --
hiera/backend/eyaml/encryptors/pks7

and losing my edits

Looking through the system I find a directory:

/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-3.0.0/lib/hiera/backend

Diggin
deeper:/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hiera-eyaml-3.0.0/lib/hiera/backend/eyaml/encryptors/pkcs7.rb

and more interestingly
/usr/lib/ruby/vendor_ruby/hiera/backend/eyaml/encryptors/pkcs7.rb

so... anybody have an idea why I'm seeing the error above?


-

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0U%3D%3DtzdN6Gq0dy6K6oRHONRpqKfzkXTZkTqHMWP_LX4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet.el.. where did it go?

2019-03-26 Thread Peter Berghold
After updating my Ubuntu laptop I noticed the Xenial package for Puppet no
longer included the puppet-el package.  Where did it go?  I relied on it to
keep my Puppet coding more or less compliant with standards... except for
that two space indentation thing...

-- 

Peter L. Berghold   salty.cowd...@gmail.com

http://devops.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1h7xR%3Dcs0nktkSJjrL5ruHEzJXw2Tcb0Tw6%3DrLFT9jLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PDK on bionic Ubuntu

2019-01-28 Thread Peter Berghold
David,

Removing ~/.pdk did the job.  I had already tried removing Gemfile.lock
thinking that was the issue.

Works good now. thanks


On Mon, Jan 28, 2019 at 10:53 AM David Schmitt 
wrote:

> This Gemfile works on my debian machine, which means we can exclude a
> whole bunch of potential problems. As next step, try removing your
> `Gemfile.lock` and the `/home/peter/.pdk/cache/ruby/` directory.
>
> I hope that helps.
>
> Cheers, David
>
> unrelated PS: the changes you made to require hiera 3.5.0 in the Gemfile
> do not work. It still pulls in version 3.4.5.13. I've created
> https://github.com/puppetlabs/pdk-templates/issues/182 to ask for
> allowing this to be overridden through the regular channels. At the same
> time, I'd also caution against modifying these bits too radically, as the
> PDK chooses the versions that we ship in the puppet-agent package, so
> changing that around will invalidate your test results.
>
>
> On Mon, Jan 28, 2019 at 3:21 PM Peter Berghold 
> wrote:
>
>> Gemfile
>> source ENV['GEM_SOURCE'] || 'https://rubygems.org'
>>
>> def location_for(place_or_version, fake_version = nil)
>>   git_url_regex = %r{\A(?(https?|git)[:@][^#]*)(#(?.*))?}
>>   file_url_regex = %r{\Afile:\/\/(?.*)}
>>
>>   if place_or_version && (git_url = place_or_version.match(git_url_regex))
>> [fake_version, { git: git_url[:url], branch: git_url[:branch],
>> require: false }].compact
>>   elsif place_or_version && (file_url =
>> place_or_version.match(file_url_regex))
>> ['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
>>   else
>> [place_or_version, { require: false }]
>>   end
>> end
>>
>> ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
>> minor_version = ruby_version_segments[0..1].join('.')
>>
>> group :development do
>>   gem "fast_gettext", '1.1.0', require: false if
>> Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
>>   gem "fast_gettext",  require: false if
>> Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
>>   gem "json_pure", '<= 2.0.1', require: false if
>> Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
>>   gem "json", '= 1.8.1',   require: false if
>> Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
>>   gem "json", '<= 2.0.4',  require: false if
>> Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
>>   gem "puppet-module-posix-default-r#{minor_version}", require: false,
>> platforms: [:ruby]
>>   gem "puppet-module-posix-dev-r#{minor_version}", require: false,
>> platforms: [:ruby]
>>   gem "puppet-module-win-default-r#{minor_version}",   require: false,
>> platforms: [:mswin, :mingw, :x64_mingw]
>>   gem "puppet-module-win-dev-r#{minor_version}",   require: false,
>> platforms: [:mswin, :mingw, :x64_mingw]
>> end
>>
>> puppet_version = ENV['PUPPET_GEM_VERSION']
>> facter_version = ENV['FACTER_GEM_VERSION']
>> hiera_version = ENV['3.5.0']
>>
>>
>> gems = {}
>>
>> gems['puppet'] = location_for(puppet_version)
>>
>> # If facter or hiera versions have been specified via the environment
>> # variables
>>
>> gems['facter'] = location_for(facter_version) if facter_version
>> gems['hiera'] = location_for('3.5.1') if hiera_version
>>
>> if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)}
>>   # If we're using a Puppet gem on Windows which handles its own
>> win32-xxx gem
>>   # dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
>>   gems['win32-dir'] =  ['<= 0.4.9', require: false]
>>   gems['win32-eventlog'] = ['<= 0.6.5', require: false]
>>   gems['win32-process'] =  ['<= 0.7.5', require: false]
>>   gems['win32-security'] = ['<= 0.2.5', require: false]
>>   gems['win32-service'] =  ['0.8.8', require: false]
>> end
>>
>> gems.each do |gem_name, gem_params|
>>   gem gem_name, *gem_params
>> end
>>
>> # Evaluate Gemfile.local and ~/.gemfile if they exist
>> extra_gemfiles = [
>>   "#{__FILE__}.local",
>>   File.join(Dir.home, '.gemfile'),
>> ]
>>
>> extra_gemfiles.each do |gemfile|
>>   if File.file?(gemfile) && File.readable?(gemfile)
>> eval(File.read(gemfile), binding)
>>   end
>> end
>

Re: [Puppet Users] PDK on bionic Ubuntu

2019-01-28 Thread Peter Berghold
Gemfile
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

def location_for(place_or_version, fake_version = nil)
  git_url_regex = %r{\A(?(https?|git)[:@][^#]*)(#(?.*))?}
  file_url_regex = %r{\Afile:\/\/(?.*)}

  if place_or_version && (git_url = place_or_version.match(git_url_regex))
[fake_version, { git: git_url[:url], branch: git_url[:branch], require:
false }].compact
  elsif place_or_version && (file_url =
place_or_version.match(file_url_regex))
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
  else
[place_or_version, { require: false }]
  end
end

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
  gem "fast_gettext", '1.1.0', require: false if
Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
  gem "fast_gettext",  require: false if
Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
  gem "json_pure", '<= 2.0.1', require: false if
Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
  gem "json", '= 1.8.1',   require: false if
Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
  gem "json", '<= 2.0.4',  require: false if
Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
  gem "puppet-module-posix-default-r#{minor_version}", require: false,
platforms: [:ruby]
  gem "puppet-module-posix-dev-r#{minor_version}", require: false,
platforms: [:ruby]
  gem "puppet-module-win-default-r#{minor_version}",   require: false,
platforms: [:mswin, :mingw, :x64_mingw]
  gem "puppet-module-win-dev-r#{minor_version}",   require: false,
platforms: [:mswin, :mingw, :x64_mingw]
end

puppet_version = ENV['PUPPET_GEM_VERSION']
facter_version = ENV['FACTER_GEM_VERSION']
hiera_version = ENV['3.5.0']


gems = {}

gems['puppet'] = location_for(puppet_version)

# If facter or hiera versions have been specified via the environment
# variables

gems['facter'] = location_for(facter_version) if facter_version
gems['hiera'] = location_for('3.5.1') if hiera_version

if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)}
  # If we're using a Puppet gem on Windows which handles its own win32-xxx
gem
  # dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
  gems['win32-dir'] =  ['<= 0.4.9', require: false]
  gems['win32-eventlog'] = ['<= 0.6.5', require: false]
  gems['win32-process'] =  ['<= 0.7.5', require: false]
  gems['win32-security'] = ['<= 0.2.5', require: false]
  gems['win32-service'] =  ['0.8.8', require: false]
end

gems.each do |gem_name, gem_params|
  gem gem_name, *gem_params
end

# Evaluate Gemfile.local and ~/.gemfile if they exist
extra_gemfiles = [
  "#{__FILE__}.local",
  File.join(Dir.home, '.gemfile'),
]

extra_gemfiles.each do |gemfile|
  if File.file?(gemfile) && File.readable?(gemfile)
eval(File.read(gemfile), binding)
  end
end
# vim: syntax=ruby


On Mon, Jan 28, 2019 at 10:19 AM David Schmitt 
wrote:

> please also provide the Gemfile as I've asked above. Without that it's
> impossible to reproduce locally and/or diagnose.
>
>
>
> On Mon, Jan 28, 2019 at 3:03 PM Peter Berghold 
> wrote:
>
>> Yes that was done in a module created by PDK originally.
>>
>> Here is the debug output
>>
>> peter@saltycowdawg: mediawiki]:(master): pdk test unit --debug
>> pdk (INFO): Using Ruby 2.5.1
>> pdk (INFO): Using Puppet 6.0.2
>> pdk (DEBUG): Checking for missing Gemfile dependencies.
>> pdk (DEBUG): Using '/opt/puppetlabs/pdk/private/ruby/2.5.1/bin/bundle'
>> from PDK package.
>> pdk (DEBUG): Executing '/opt/puppetlabs/pdk/private/ruby/2.5.1/bin/bundle
>> check --gemfile=/home/peter/prj-src/puppet/mediawiki/Gemfile --dry-run'
>> pdk (DEBUG): Command environment:
>> pdk (DEBUG):   PUPPET_GEM_VERSION: 6.0.2
>> pdk (DEBUG):   BUNDLE_IGNORE_CONFIG: 1
>> pdk (DEBUG):   GEM_HOME: /home/peter/.pdk/cache/ruby/2.5.0
>> pdk (DEBUG):   GEM_PATH:
>> /opt/puppetlabs/pdk/private/ruby/2.5.1/lib/ruby/gems/2.5.0:/opt/puppetlabs/pdk/share/cache/ruby/2.5.0:/opt/puppetlabs/pdk/private/puppet/ruby/2.5.0
>> pdk (DEBUG):   PATH:
>> /opt/puppetlabs/pdk/private/ruby/2.5.1/bin:/home/peter/.pdk/cache/ruby/2.5.0/bin:/opt/puppetlabs/pdk/private/ruby/2.5.1/lib/ruby/gems/2.5.0/bin:/opt/puppetlabs/pdk/share/cache/ruby/2.5.0/bin:/opt/puppetlabs/pdk/private/puppet/ruby/2.5.0/bin:/opt/puppetlabs/pdk/bin:/home/peter/bin:/home/peter/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin:/opt/puppetlabs/pdk/private/git/b

Re: [Puppet Users] PDK on bionic Ubuntu

2019-01-28 Thread Peter Berghold
 you're running after
> adding `--debug`, and - for this specific case - the Gemfile. With that
> information we'll have a better chance of figuring out what's going on
> there.
>
>
> Cheers, David
>
> On Sat, Jan 26, 2019 at 3:43 PM Peter Berghold 
> wrote:
>
>> When I run "pdk test unit" I get the following error:
>> pdk (INFO): Using Ruby 2.5.1
>> pdk (INFO): Using Puppet 6.0.2
>> pdk (FATAL):
>> /opt/puppetlabs/pdk/private/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in
>> `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle
>> (Gem::GemNotFoundException)
>> from
>> /opt/puppetlabs/pdk/private/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in
>> `activate_bin_path'
>> from /opt/puppetlabs/pdk/private/ruby/2.5.1/bin/bundle:23:in `'
>>
>> pdk (FATAL): Unable to resolve Gemfile dependencies.
>>
>> I did a "gem list" and bundler is installed. What is the magic foo that I
>> can do to make this work?
>>
>>
>> --
>>
>> Peter L. Berghold   salty.cowd...@gmail.com
>>
>> h <http://blog.berghold.net>ttp://science-fiction.berghold.net
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAArvnv1gacMoibL%3DZm9D_icP%2Bse5WvWsiSFMnp69GF2yzSra%3DQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv1gacMoibL%3DZm9D_icP%2Bse5WvWsiSFMnp69GF2yzSra%3DQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Cheers, David
>
> https://twitter.com/dev_el_ops
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CALF7fHafxdimbH6KfORRtK3LMRm5zRr8s9cOi_WCd3avYJg93g%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CALF7fHafxdimbH6KfORRtK3LMRm5zRr8s9cOi_WCd3avYJg93g%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Peter L. Berghold   salty.cowd...@gmail.com

h <http://blog.berghold.net>ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2u374gUyMEdXonyU_ubbStyyhGziFDqaa9%3D5JOxovt6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PDK on bionic Ubuntu

2019-01-26 Thread Peter Berghold
When I run "pdk test unit" I get the following error:
pdk (INFO): Using Ruby 2.5.1
pdk (INFO): Using Puppet 6.0.2
pdk (FATAL):
/opt/puppetlabs/pdk/private/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in
`find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle
(Gem::GemNotFoundException)
from
/opt/puppetlabs/pdk/private/ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in
`activate_bin_path'
from /opt/puppetlabs/pdk/private/ruby/2.5.1/bin/bundle:23:in `'

pdk (FATAL): Unable to resolve Gemfile dependencies.

I did a "gem list" and bundler is installed. What is the magic foo that I
can do to make this work?


-- 

Peter L. Berghold   salty.cowd...@gmail.com

h ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1gacMoibL%3DZm9D_icP%2Bse5WvWsiSFMnp69GF2yzSra%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Hiera and precedence

2019-01-17 Thread Peter Berghold
I'm having a revertment to my noob days with respect to how hiera works.
(Version 3 for now)

If I have the hierarchy of

- common
- nodes/"%{fqdn}"
- datacenter/"%{fdatacenter}"

if in common.yaml I have "module::parms::server: server1" and in
nodes/myclient.yaml I have "module::parms::server: server2" and in
datacenter/NYCA.yaml (and the host presents NYCA as its datacenter) I have
"module::parms::server: server3" which value will be presented for host
myclient?

I could have sworn I read the lower down the list of hierarchy a value was
it would override the one above it. I just read this morning that hiera
stops at the first value it finds which is a bit of a problem for what I'm
trying to accomplish.



-- 

Peter L. Berghold   salty.cowd...@gmail.com

h ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0%2BApOXSmMJfTVOpLAH4%2Bx7uZ5dSa84mibO_%2BDr2yMD%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Concerns about Puppet 4 master serving Puppet 3 clients

2019-01-14 Thread Peter Berghold
I am about to have our first Puppet 4 Puppet master into our production
environment. We have a very large community of Puppet 3 "leaf nodes" being
managed by our old Puppet 3 infrastructure.

What issues might I run into with that and what should I do to mitigate
this?

-- 

Peter L. Berghold   salty.cowd...@gmail.com

h ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0KvkdZqV6dgBNbPnoEeyKeAchrD%2Bt5wehmpwwfLGYdkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet 3 and hiera

2019-01-10 Thread Peter Berghold
>> Is there any chance that you have *too new* an Hiera installed?

I was actually worried at first that there was a regression in terms of
what hiera was on there given the host was "patched" recently.  I may have
found the problem and yes I suspected right along the issue was on the
remote master not the client.  (well except for a brief moment in time at
around 6AM the installation starting at midnight... I was a bit foggy then.)

I'm deploying a "fix" and if it works I'm going to post as much here.



On Thu, Jan 10, 2019 at 9:57 AM jcbollinger 
wrote:

>
>
> On Wednesday, January 9, 2019 at 11:06:54 AM UTC-6, Salty Old Cowdawg
> wrote:
>>
>> Hi folks,
>>
>> I know... I know... get off of Puppet 3.  I'll be getting there soon.
>>
>> Right now I have Puppet 3 in our production environment where I work.
>> Long political story as to why we are still on 3 that I won't get into.   I
>> just did a release of the Puppet code and one of the "features" of the
>> release is moving all the data out of the code into hiera.
>>
>> This has been shaken out and tested thoroughly and works fine. So far so
>> good.  Superficially at least both the production and lab environments
>> match each other in terms of Puppet version OS etc.   Both lab and
>> production use RHEL 6.5 (?) and here's where the issue comes in.
>>
>> Puppet servers (I have a tiered environment, grand master -> manages ->
>> remote masters -> manage clients) all seem to be working fine.  On the
>> client nodes the Puppet agent terminates with an error:
>>
>> Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error
>> +RuntimeError: Hiera terminus not supported without hiera library at
>> +/etc/puppet/environments/Production/manifests/site.pp:24 on node
>> +
>>
>>
>
> This may already be clear to you, but just in case, do note that although
> this error is *reported* on the clients, it *occurs* on their master.  I
> guess that's one or more of the remote masters.  If you're thinking in
> terms of what is installed on the agent machines then that could be
> throwing you off.  Does the Hiera command-line tool run on the relevant
> masters?
>
> I'm afraid I don't know where to find P3 docs any longer, but if I did, I
> would be looking for clues among the installation instructions.  The docs
> now available for both Puppet overall and for the Hiera subsystem both
> assume that you'll get Hiera in the same package that provides Puppet, or
> at least as a dependency of that package.
>
>
>
>> I did some Googling looking for a solution and I found one mention of the
>> need for a "ruby-hiera" package.  This is not installed in our test lab so
>> this seems to be a red herring to me but I'm very willing to be wrong.
>>
>
>
> Hmm.  I don't find a "ruby-hiera" in Fedora's Koji system.  Their Hiera
> packages (i.e. those that go into EPEL) are named simply "hiera".  And
> their Puppet packages, including for Puppet 3, have that "hiera" package as
> a dependency.
>
>
> The line of code the error is happening on cited above is simple
>> hiera_include('classes');
>>
>> Thoughts anybody?
>>
>
>
> Is there any chance that you have *too new* an Hiera installed?
>
>
> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d4efba93-eadd-4171-8493-e25500e7dcc8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Peter L. Berghold   salty.cowd...@gmail.com

h ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3PY8BPHcoHzMOHG3eeuxGg-fSkhTw-cq8Ji7s-JD%3Dh-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet 3 and hiera

2019-01-09 Thread Peter Berghold
Hi folks,

I know... I know... get off of Puppet 3.  I'll be getting there soon.

Right now I have Puppet 3 in our production environment where I work.  Long
political story as to why we are still on 3 that I won't get into.   I just
did a release of the Puppet code and one of the "features" of the release
is moving all the data out of the code into hiera.

This has been shaken out and tested thoroughly and works fine. So far so
good.  Superficially at least both the production and lab environments
match each other in terms of Puppet version OS etc.   Both lab and
production use RHEL 6.5 (?) and here's where the issue comes in.

Puppet servers (I have a tiered environment, grand master -> manages ->
remote masters -> manage clients) all seem to be working fine.  On the
client nodes the Puppet agent terminates with an error:

Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error
+RuntimeError: Hiera terminus not supported without hiera library at
+/etc/puppet/environments/Production/manifests/site.pp:24 on node
+

I did some Googling looking for a solution and I found one mention of the
need for a "ruby-hiera" package.  This is not installed in our test lab so
this seems to be a red herring to me but I'm very willing to be wrong.

The line of code the error is happening on cited above is simple
hiera_include('classes');

Thoughts anybody?
-- 

Peter L. Berghold   salty.cowd...@gmail.com

h ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv281q9BHN5eY22MCcS_rtQ4utkmfYffY15b0cRtuUCg_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] A GUI tool for Hiera

2019-01-08 Thread Peter Berghold
I don't want to sound harsh but I'm going to be blunt.   I could not get
this thing to work for me on Linux (Ubuntu) even when doing an "npm audit
fix" followed by an "npm audit fix --force" followed by an "npm install"

Very disappointing to me.

On Tue, Jan 8, 2019 at 12:57 PM desertkun  wrote:

> Hello, everyone.
>
> I have made a small useful open source project for Puppet/Hiera, so I hope
> you can excuse me a bit of advertisement of it for greater good.
>
> https://github.com/desertkun/hiera-editor
>
> Basically it takes editing Hiera configurations to a new level.
> It parses modules with puppet-strings to extract class information like
> field names, types and doc strings, and retrieves default values of class
> fields
> by doing best-effort compilation (with puppet-parser) of Puppet AST on
> your machine. So no more typos and less of "commit-deploy-check" cycles.
>
>
>
> The goal of the project is to help manage servers with Puppet to those who
> far away from the back-end, including Puppet itself,
> like "I need to deploy nglinx but I have installed debian for the first
> time". So if you have a project that complex that requires Puppet to deploy
> it, having some
> tool to introduce Puppet to end users of your project might improve the
> learning curve.
>
> Would really appreciate any input on the idea, including concerns like
> "there's no need for this" as I just have made the project public and still
> not sure if I should continue.
>
> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/1eb43a86-8f65-42d6-910f-9d45a8789256%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Peter L. Berghold   salty.cowd...@gmail.com

h ttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3GL%3Dy4hrxn90OBHB-eKgzep8LtvJM31PucJn1ff%3DprcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] More oddities with installting FOSS version of Puppet

2018-07-26 Thread Peter Berghold
Josh,

I wiped the entire trees meaning /opt/puppetlabs and /etc/puppetlabs
recursive.

On Wed, Jul 25, 2018, 16:17 Josh Cooper  wrote:

> On Wed, Jul 25, 2018 at 6:16 AM Peter Berghold 
> wrote:
> >
> > Once again I undertook trying to get a puppetserver in my personal
> computing environment to work and during a fresh install of puppetserver
> (removing agent and server first) and clearing the /opt/puppetlabs and
> /etc/puppetlabs directories I see the following complaints:
>
> Did you delete the /opt/puppetlabs and /etc/puppetlabs directories or
> delete their contents? If it's the latter, it may be that the
> puppet-agent package doesn't recreate the intermediate directories,
> e.g. /opt/puppetlabs/puppet/share, causing later steps to fail.
>
> >
> > Setting up puppet-agent (1.10.14-1xenial) ...
> > chmod: cannot access
> '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect/puppet.vim': No
> such file or directory
> > chmod: cannot access
> '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin/puppet.vim': No
> such file or directory
> > chmod: cannot access
> '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent/puppet.vim': No
> such file or directory
> > chmod: cannot access
> '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax/puppet.vim': No
> such file or directory
> > chmod: cannot access
> '/etc/puppetlabs/code/environments/production/environment.conf': No such
> file or directory
> > Setting up puppetserver (2.8.1-1puppetlabs1) ...
> > usermod: no changes
> >
> > This is on an Ubuntu 16 server and still puppetserver complains about
> stuff being missing such as the CAservice now.
> >
> > Anybody else run into this?
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAArvnv2UyOurHTWArzv7DWUtjtJb85C%2BAPZb%3D2EQAYfF%2B-HScw%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> Josh
>
> --
> Josh Cooper | Software Engineer
> j...@puppet.com | @coopjn
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CA%2Bu97unXLyfrqDJ4n72%2BvR6SYjja%2B9EvFzhWA%3D5MRbMv_VWPFg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2zAT7pnhPc8WC70x-QskMAOyUqdmQtbhMZDHx8YxSxZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Amplification of the issues I'm encountering with puppetserver on Ubuntu 16

2018-07-25 Thread Peter Berghold
It would appear that at least a majority of the configuration files that
puppetserver needs to start up do not exist.  Is this by design?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2UzobkZze6PwwTLFWhF7a5PxF0hgR3nihzXQotW_R6Wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] More oddities with installting FOSS version of Puppet

2018-07-25 Thread Peter Berghold
Once again I undertook trying to get a puppetserver in my personal
computing environment to work and during a fresh install of puppetserver
(removing agent and server first) and clearing the /opt/puppetlabs and
/etc/puppetlabs directories I see the following complaints:

Setting up puppet-agent (1.10.14-1xenial) ...
chmod: cannot access
'/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect/puppet.vim': No
such file or directory
chmod: cannot access
'/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin/puppet.vim': No
such file or directory
chmod: cannot access
'/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent/puppet.vim': No
such file or directory
chmod: cannot access
'/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax/puppet.vim': No
such file or directory
chmod: cannot access
'/etc/puppetlabs/code/environments/production/environment.conf': No such
file or directory
Setting up puppetserver (2.8.1-1puppetlabs1) ...
usermod: no changes

This is on an Ubuntu 16 server and still puppetserver complains about stuff
being missing such as the CAservice now.

Anybody else run into this?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2UyOurHTWArzv7DWUtjtJb85C%2BAPZb%3D2EQAYfF%2B-HScw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] woes installing Puppet server (won't start)

2018-07-20 Thread Peter Berghold
I've been running my own personal Puppet server at home for a very long
time and have rebuilt and installed Puppet server many times so what is
going on now makes no sense to me.

Yesterday I decided to rebuild my Puppet master yet again and loaded the
puppetserver package from:

puppetlabs-release-pc1-xenial.deb
puppet5-release-xenial.deb
puppet5-release-stretch.deb
puppet5-nightly-release-stretch.deb

In that order.

I'm running on Ubuntu (14?) and in none of the above versions does the
puppetserver process start up and stay up.  Gleaning the journal
(journalctl -u puppetserver --follow) I find this little nugget of fun:
Jul 20 06:13:03 myserver.tld  puppetserver[24046]: 06:13:03.762 [main]
ERROR puppetlabs.trapperkeeper.internal - Error during app buildup!
Jul 20 06:13:03 mysever.tld puppetserver[24046]:
java.lang.RuntimeException: Service ':FilesystemWatchService' not found

What the heck is that about?  What do I need to do to fix this?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0PKo0%3DVV2xBTZ2doF%3Dz1Kqb9e-%3D03oDd57%3DcdV107gag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Style (syntax?) question

2018-06-04 Thread Peter Berghold
I was looking at someone else's code one day last week and saw a pattern
I've not seen before. Maybe that's what I get for developing Puppet code in
a vacuum. :-)

class someclass (
$parm1 = $::someclass::params::parm1,
$parm2 = $::someclass::params::parm2   # so far I get it.
) inherits someclass::params { # ok, I get it

 class{'someclass::package': }# OK
 -> class('someclass::configure':}# right...
 -> Class{'someclass':}#  HUH?  What does that do?
}

Is that last step necessary and why?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv22e-Wbp8dtD9bUHTOxf68e8p3rWdNP8A2pFR6txAamzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Misplaced Web Page (jenkins ci_reporter rspec)

2017-12-21 Thread Peter Berghold
Just a week or two ago I found (re-found?) a web page that laid out all the
steps necessary to incorporate ci_reporter and publish RCOV test results.
Can't find it now.  Anybody got the link for that?
Trying to add this functionality to the Jenkins pipeline that publishes my
modules to our testing environment.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0VHqK0T41fWqeL_iM%3DTPVumEEG9w4Afj__8NvXwEhH-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Clean Puppet 3 to Puppet 4 migration

2017-10-11 Thread Peter Berghold
About three years ago (4 years ago?) I deployed a Puppet infrastructure for
my company and department based on FOSS Puppet 3.7.   Given that's been
deprecated of course I'm very much looking to migrate to Puppet 4.
Besides for about three months I worked for another company and got spoiled
by Puppet 4.

So I'm back at my old digs and assessing what it will take to go from P3 to
P4.   Here are some of the things I have to think about

1) the migration needs to be fully automated both on the server end and the
client end.
2) no really this is going to be done by operations personnel who have
a low threshold of fright for Puppet in spite of my best efforts to
desensitize them.
3) There is as penetrable firewall between me (developer) and the Puppet
infrastructure servers and clients so I cannot personally intervene

Anybody out there been through this pain and have any suggestions and
pointers on how to make this happen with minimal "breakage?"

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0END3xCwQsNwK9jjkSEq37LvY%3Dy-Ck7johj5Af3GHgWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Is hiera broken in FOSS Puppet 3.7.2?

2017-09-26 Thread Peter Berghold
I was afraid that would be an answer I got... :-)

There are plans to move to Puppet 4 where I know all this works but given I
have to support all this on RHEL 6.x there may be some obstacles there.   I
would LOVE to wave a magic wand and make Puppet 3.x go away

So.. 3.8 eh?  There's something to investigate


On Tue, Sep 26, 2017 at 1:46 PM Rob Nelson <rnels...@gmail.com> wrote:

> If I had to guess, it would be that the merge settings either don't exist
> or are buggy in 3.7.2. 3.8 was EOL in December last year, if you have to
> stick with 3 I'd suggest at least trying it with 3.8.
>
> On Tue, Sep 26, 2017 at 12:35 PM Peter Berghold <salty.cowd...@gmail.com>
> wrote:
>
>> Seeing things like doing a hiera lookup inside a manifest such as
>>
>> $somevar = hiera('randomvalue','notfound')
>>
>> returning nils and other odd behavior.
>>
>> I have a hiera.yaml file that looks like:
>>
>> ---
>> :backends:
>>   - yaml
>> :merge_behavior: deeper
>> :deep_merge_options: {}
>> :yaml:
>>   :datadir: "/etc/puppet/environments/%{environment}/hieradata"
>> :hierarchy:
>>   - "function/${::facts.host_function}"
>>   - "datacenter/%{::facts.sitename}"
>>   - "nodes/%{fqdn}"
>>   - "common_classes"
>>   - "common"
>>
>> and yet I see both the nodes and common_classes being ignored.
>>
>> Of more concern to me is I'm trying to set values such as
>>
>> somemod::parms::value1:  somevalue
>>
>> and that's being ignored.
>>
>> Puppet.conf is configured correctly because it *is* finding a class list
>> in common.yaml but nowhere else.
>>
>>
>> Thoughts?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAArvnv2ssHekfEX9Asi4eEriQqJ0ohgbyg%3DGSvM%2B0L_eGU2RUw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv2ssHekfEX9Asi4eEriQqJ0ohgbyg%3DGSvM%2B0L_eGU2RUw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Rob Nelson
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAC76iT8LVV3HzOC-9eKDyHJKhJTdGjEY9j5jWYqafW8BY6GYnQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAC76iT8LVV3HzOC-9eKDyHJKhJTdGjEY9j5jWYqafW8BY6GYnQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1Mnqs1B_ZAUUFSb1xSifUu6X%2Birj41C9j1UJa%2Bprg2QQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Is hiera broken in FOSS Puppet 3.7.2?

2017-09-26 Thread Peter Berghold
Seeing things like doing a hiera lookup inside a manifest such as

$somevar = hiera('randomvalue','notfound')

returning nils and other odd behavior.

I have a hiera.yaml file that looks like:

---
:backends:
  - yaml
:merge_behavior: deeper
:deep_merge_options: {}
:yaml:
  :datadir: "/etc/puppet/environments/%{environment}/hieradata"
:hierarchy:
  - "function/${::facts.host_function}"
  - "datacenter/%{::facts.sitename}"
  - "nodes/%{fqdn}"
  - "common_classes"
  - "common"

and yet I see both the nodes and common_classes being ignored.

Of more concern to me is I'm trying to set values such as

somemod::parms::value1:  somevalue

and that's being ignored.

Puppet.conf is configured correctly because it *is* finding a class list in
common.yaml but nowhere else.


Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2ssHekfEX9Asi4eEriQqJ0ohgbyg%3DGSvM%2B0L_eGU2RUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Using SRV records...

2017-09-22 Thread Peter Berghold
Doesn't seem to be working for me in Puppet 3.7... should it?

I followed instructions from this page:
https://docs.puppet.com/puppet/3/scaling_multiple_masters.html

Had my support team setup records for three domains, have a test machine
pointing to one of them and it fails to find the Puppet master.

Checked using "dig -t srv" and the record resolves so I'm rather baffled at
the moment.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1d54FpsPgXkCCscC5X_UsM8WrxFWrqwhv%2BqJLOoGtBLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Failed require resolution from RSpec.

2017-07-11 Thread Peter Berghold
I have a module that I'm refactoring that manages NTP servers and clients.
The client portion of the module performs a puppetdb (Forge Module
dalen-puppetdbquery) lookup to find the local NTP stratum 2 servers to
populate into the client's /etc/ntp.conf file.  Works great in real life
but the module fails spec testing with an error:

Failure/Error: require 'puppet/util/puppetdb'

I am using the bundler to load necessary gem files locally.   Here is my
Gemfile:

source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" :
['>= 3.3']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0'
gem 'rspec', '>= 0.0.0'
gem 'puppetdb-ruby'
gem 'puppetdb-terminus'
gem 'puppetdb_query'
gem 'ruby-puppetdb'
gem "simplecov-rcov"
gem "ci_reporter"


So, what am I missing?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0s2xH4hh0dKPZPECj41RKcOnAFXgkaip7dhPrQJMthpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: parameters and hiera

2017-07-11 Thread Peter Berghold
OK... that calms my concerns a lot.

I have a second Puppet infrastructure that I'm about to build out that I'm
considering not putting Foreman on it at all.  Reason being it is going to
be in an environment where there won't be connectivity to 80/443 at all
from outside the environment.

On Mon, Jul 10, 2017 at 11:54 AM Gavin Williams  wrote:

> This is exactly how we use Foreman & Hiera in our installation...
>
> The key thing to set is when configuring the Puppet classes in Foreman,
> the 'Use Puppet Default' or 'Override' box needs to be checked.
> This means that if no values are stored in Foreman, then no value will be
> provided to Puppet, and Puppet will then use Hiera to look that value up.
>
> If you don't check that box, then you run the risk of providing empty
> strings to Puppet, thereby skipping the Hiera lookup :)
>
> HTH
>
> Gav
>
>
> On Monday, 10 July 2017 16:44:32 UTC+1, Salty Old Cowdawg wrote:
>>
>> In the shop that I code for these days we have The Foreman ENC set up and
>> running.  I want to add hiera to the mix but allow our operations folks the
>> options the ability to change parameter values using the Foreman GUI.
>> Given the applications we are having Puppet manage this is rather mandatory
>> since the values in question get changed often enough to deal with changes
>> in the operational conditions as they change.  Having operators edit hiera
>> YAML files is not a desired thing.
>>
>> I have some ideas for how to implement this but would like some input
>> from others that may have dealt with the same thing.  What I'm looking for
>> is a coding pattern that says "if foreman is blank, use hiera and if hiera
>> is blank use this default."
>>
>> thoughts anybody?
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/311ba2bb-87a6-4c73-905b-339bed9dd779%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2gKBVh6FF%2BM8Gp90ebeONFNVdtGk6nnKFDjVO6TUOxiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] parameters and hiera

2017-07-10 Thread Peter Berghold
In the shop that I code for these days we have The Foreman ENC set up and
running.  I want to add hiera to the mix but allow our operations folks the
options the ability to change parameter values using the Foreman GUI.
Given the applications we are having Puppet manage this is rather mandatory
since the values in question get changed often enough to deal with changes
in the operational conditions as they change.  Having operators edit hiera
YAML files is not a desired thing.

I have some ideas for how to implement this but would like some input from
others that may have dealt with the same thing.  What I'm looking for is a
coding pattern that says "if foreman is blank, use hiera and if hiera is
blank use this default."

thoughts anybody?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2hyXDTSvx_r3cdst78qy4fbG7M5bfCkJDXRMHr%2BTMwDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Packet Rate?

2017-07-07 Thread Peter Berghold
Has anybody out there done any sort of study on what Puppet produces in
terms of I/O packet rate?  I'm being asked to fill in a spreadsheet with
that information

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3G8Lbe8GL11SGC251YYn-SjUs-KEPR2NfDjKGqzgZhEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] A coding question about PE

2017-01-26 Thread Peter Berghold
Hi there.  I find myself working for a company that is using PE and for the
last umteen years I've used the FOSS version.

That said I have a question that probably the answer to would apply to both
PE and FOSS.

I am creating a module for the sake of another module (if that makes sense)
that will self populate its files subdirectory with packages for
installation.  (puppetlabs-splunk)   What I'd like to know is if there is a
programatic way either in pure Puppet manifest code or through a custom
function for a Puppet module to be "self aware" enough to know the full
path of where it is installed?

For instance if I put this module in the development environment I'd like
it to know it should store files in
/etc/puppetlabs/code/environments/development/modules//files.  In
the UAT environment same thing only substitute "uat" for "developement" in
the path.

Gotta think there's a way to do this.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv19pPf4ewgQjzFLW%3DKKOYCxZ761HAdxN3mz63eBMknePQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Issue with puppetlabs-java

2017-01-20 Thread Peter Berghold
Supposedly on the forge site it says the module was tested under Ubuntu.
I'm running Ubuntu Xenial and when I apply the java::oracle class to the
machine I get --

Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
Server Error: Evaluation Error: Error while evaluating a Resource
Statement, Evaluation Error: Error while evaluating a Function Call,
unsupported platform Ubuntu at
/etc/puppetlabs/code/environments/production/modules/java/manifests/oracle.pp:127:11


Suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0qmHON6MGkJyy15_Wc2q5vqYFsPgHta3FnNkxyEMCjqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Error while spec testing -- missing collect?

2016-12-05 Thread Peter Berghold
Give the man a cigar.  As soon as I mocked up "ipaddress" it was happy.
Don't know why I didn't see that


On Mon, Dec 5, 2016 at 12:43 PM Rob Nelson <rnels...@gmail.com> wrote:

> The error is in the function query_facts, or code that it calls. Puppet is
> not great about reporting on a Ruby code failure called from the puppet DSL.
>
> I couldn't tell you the actual cause but if you look wherever that
> function is defined you may see a collect statement and that should guide
> you. My guess is that some fact it relies on wasn't mocked (well) and is
> returning nil, thus there is no .collect method on nil.
>
> On Mon, Dec 5, 2016 at 5:25 PM Peter Berghold <salty.cowd...@gmail.com>
> wrote:
>
> The piece of Puppet code the spec testing is complaining about is here:
>
> --8< snip
> 8<-
>
>   $servers = ntp_unpackservers(
> query_facts("is_ntp_server=true and sitename =
> ${sitename}",'ipaddress')
>   )
>
> --8< snip
> 8<-
>
> and the error I'm seeing is:
>
> --8< snip
> 8<-
>
>  Puppet::Error:
>undefined method `collect' for "ipaddress":String at /home/ account>/puppet-module-src/ntp/spec/fixtures/modules/ntp/manifests/client.pp:8
> on node redacted
>
> --8< snip
> 8<-
>
> so the question is what defines "collect?"
>
> The code sniglet is a query of PuppetDB that works well in our test and
> production environments but I'm having issues trying to convince RSpec it's
> working.
>
> Thoughts? Suggestions?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAArvnv3ivnqNoQk2dFzuD3YYpy4p9YBY_XpCZUgc2wTT4vNsWA%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAArvnv3ivnqNoQk2dFzuD3YYpy4p9YBY_XpCZUgc2wTT4vNsWA%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Rob Nelson
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAC76iT8F4vS4BTvP5XV%3DO93hY3aFT-fb3wEQ%3DyaJrO3K8BK-bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAC76iT8F4vS4BTvP5XV%3DO93hY3aFT-fb3wEQ%3DyaJrO3K8BK-bw%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3WRpaQn8LK0dWDVZZETc8ax%3D1MZOq%2BfL-VKU6PteKwRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Error while spec testing -- missing collect?

2016-12-05 Thread Peter Berghold
The piece of Puppet code the spec testing is complaining about is here:

--8< snip
8<-

  $servers = ntp_unpackservers(
query_facts("is_ntp_server=true and sitename = ${sitename}",'ipaddress')
  )

--8< snip
8<-

and the error I'm seeing is:

--8< snip
8<-

 Puppet::Error:
   undefined method `collect' for "ipaddress":String at /home//puppet-module-src/ntp/spec/fixtures/modules/ntp/manifests/client.pp:8
on node redacted

--8< snip
8<-

so the question is what defines "collect?"

The code sniglet is a query of PuppetDB that works well in our test and
production environments but I'm having issues trying to convince RSpec it's
working.

Thoughts? Suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3ivnqNoQk2dFzuD3YYpy4p9YBY_XpCZUgc2wTT4vNsWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Peter Berghold
Garret:  I do have dalen-puppetdb in my .fixtures.yaml file.   A link to my
project?  unfortunately I'm developing all this work inside my client's
cloud and can't provide a link.

On Tue, Nov 1, 2016 at 6:11 PM Peter Berghold <salty.cowd...@gmail.com>
wrote:

> That's what I was beginning to suspect Andy.  Now I have to go find the
> Ubuntu version of that
>
> On Tue, Nov 1, 2016 at 5:38 PM Andrew Grimberg <tyk...@bardicgrove.org>
> wrote:
>
> On 11/01/2016 02:25 PM, Garrett Honeycutt wrote:
> > On 11/1/16 4:03 PM, Peter Berghold wrote:
> >> I have a module that I am writing spec tests for that uses the Puppet
> >> Forge module cited in the subject line to query for a list of nodes
> >> fitting a particular criteria.  When I run the spec test it bombs out
> >> with a message: "cannot load such file -- puppet/util/puppetdb"
> >>
> >> After a bit of searching I am still left wondering package or gem this
> >> is looking for.  Anybody know?
> >>
> >
> > Hi,
> >
> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> > your project would make debugging easier.
>
> It's probably related to the fact that dalen-puppetdbquery requires
> PuppetDB Terminus installed. Not certain how you get around that for
> spec tests.
>
> -Andy-
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2FC_ZYS2ttFo_6L98EBkdNoCTXB1mP0%2BZNbRReATRRrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Peter Berghold
That's what I was beginning to suspect Andy.  Now I have to go find the
Ubuntu version of that

On Tue, Nov 1, 2016 at 5:38 PM Andrew Grimberg <tyk...@bardicgrove.org>
wrote:

> On 11/01/2016 02:25 PM, Garrett Honeycutt wrote:
> > On 11/1/16 4:03 PM, Peter Berghold wrote:
> >> I have a module that I am writing spec tests for that uses the Puppet
> >> Forge module cited in the subject line to query for a list of nodes
> >> fitting a particular criteria.  When I run the spec test it bombs out
> >> with a message: "cannot load such file -- puppet/util/puppetdb"
> >>
> >> After a bit of searching I am still left wondering package or gem this
> >> is looking for.  Anybody know?
> >>
> >
> > Hi,
> >
> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> > your project would make debugging easier.
>
> It's probably related to the fact that dalen-puppetdbquery requires
> PuppetDB Terminus installed. Not certain how you get around that for
> spec tests.
>
> -Andy-
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3HqPDnmE5y6RhUMEMt40ZWV7HB6ZgGqUHWMSb%3DegN0Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Spec testing and dalen-puppetdbquery

2016-11-01 Thread Peter Berghold
I have a module that I am writing spec tests for that uses the Puppet Forge
module cited in the subject line to query for a list of nodes fitting a
particular criteria.  When I run the spec test it bombs out with a message:
"cannot load such file -- puppet/util/puppetdb"

After a bit of searching I am still left wondering package or gem this is
looking for.  Anybody know?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1kYWtuZuybLvDnSS4Mt2vG0P0xqx9%3D1z-X5vMop0VC6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Installing puppet on Ubuntu 16 & RSpec

2016-10-28 Thread Peter Berghold
Okay I've been remiss in posting this reply but I've actually solve this
issue.

What I ended up having to do is remove puppet remove Ruby remove all the
gems and then manually clean out all the directories that are touched by
everything that I just mentioned.

Then very carefully I reinstalled everything starting with puppet and used
Deb packages instead of loading through gems.

Now everything runs very happily.

What I would gather by this is something got corrupted somewhere along the
line that forced me to take such drastic actions.

On Tue, Oct 25, 2016, 17:07 Rob Nelson <rnels...@gmail.com> wrote:

> Could you share how your testing environment is set up? Most use bundler,
> so that the puppet agent installed on the system doesn't affect the tests,
> but it would appear that is not the case here. However, before commenting
> further, we need to see a bit more about the setup.
>
> I do not think the agent failure is strictly related, in that the agent
> should work fine out of the box, but by enumerating your test setup, we may
> find some variant settings/locations you use that are causing a conflict.
>
>
> Rob Nelson
> rnels...@gmail.com
>
> On Tue, Oct 25, 2016 at 2:03 PM, Peter Berghold <salty.cowd...@gmail.com>
> wrote:
>
> What I thought were unrelated issues I've discovered they are related.
>
> I was using RSpec doing spec testing on Puppet code very happily when I
> decided to install the Puppet agent (attempting to eat my own dog food of
> course) and then RSpec broke.
>
> Error message spec started throwing out:
>
>  NoMethodError:
>undefined method `static_catalogs?' for
> #
>
> causing all my test cases to fail.
>
> Additionally the Puppet agent will not run as a service but it will run
> standalone (puppet agent -t).
>
> During install:
> Job for puppet.service failed because the control process exited with
> error code. See "systemctl status puppet.service" and "journalctl -xe" for
> details.
> invoke-rc.d: initscript puppet, action "start" failed.
>
> Checking systemctl status
>
> ● puppet.service - Puppet agent
>Loaded: loaded (/lib/systemd/system/puppet.service; enabled; vendor
> preset: enabled)
>Active: failed (Result: exit-code) since Tue 2016-10-25 18:01:14 UTC;
> 52s ago
>   Process: 7473 ExecStart=/usr/bin/puppet agent $DAEMON_OPTS (code=exited,
> status=1/FAILURE)
>
> Oct 25 18:01:13 mtznjv1pdev01 puppet[7473]: WARN: Clearing out unresolved
> specs.
> Oct 25 18:01:13 mtznjv1pdev01 puppet[7473]: Please report a bug if this
> causes problems.
> Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Could not autoload
> puppet/indirector/report/rest: uninitialized cons
> Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Did you mean?
> Puppet::Indirector
> Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Could not prepare for
> execution: Could not autoload puppet/indirecto
> Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Did you mean?
> Puppet::Indirector
> Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: puppet.service: Control process
> exited, code=exited status=1
> Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: Failed to start Puppet agent.
> Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: puppet.service: Unit entered
> failed state.
> Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: puppet.service: Failed with
> result 'exit-code'.
>
> and I get the same messages with "journalctl -ex"
>
> So for now my development system is going without a Puppet agent.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAArvnv0uZKSrWO5uwSTVKrdBLFSeaMyHcYvZ6Fvrj3xZL69A7A%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAArvnv0uZKSrWO5uwSTVKrdBLFSeaMyHcYvZ6Fvrj3xZL69A7A%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAC76iT_fHwWwGaGvDtfw8SdwGPegMq%2BjSNy51yR2vXqi0iQeww%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAC76iT_fHwWwGaGvDtfw8SdwGPegMq%2BjSNy51yR2vXqi0iQeww%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For 

[Puppet Users] Installing puppet on Ubuntu 16 & RSpec

2016-10-25 Thread Peter Berghold
What I thought were unrelated issues I've discovered they are related.

I was using RSpec doing spec testing on Puppet code very happily when I
decided to install the Puppet agent (attempting to eat my own dog food of
course) and then RSpec broke.

Error message spec started throwing out:

 NoMethodError:
   undefined method `static_catalogs?' for
#

causing all my test cases to fail.

Additionally the Puppet agent will not run as a service but it will run
standalone (puppet agent -t).

During install:
Job for puppet.service failed because the control process exited with error
code. See "systemctl status puppet.service" and "journalctl -xe" for
details.
invoke-rc.d: initscript puppet, action "start" failed.

Checking systemctl status

● puppet.service - Puppet agent
   Loaded: loaded (/lib/systemd/system/puppet.service; enabled; vendor
preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-10-25 18:01:14 UTC;
52s ago
  Process: 7473 ExecStart=/usr/bin/puppet agent $DAEMON_OPTS (code=exited,
status=1/FAILURE)

Oct 25 18:01:13 mtznjv1pdev01 puppet[7473]: WARN: Clearing out unresolved
specs.
Oct 25 18:01:13 mtznjv1pdev01 puppet[7473]: Please report a bug if this
causes problems.
Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Could not autoload
puppet/indirector/report/rest: uninitialized cons
Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Did you mean?
Puppet::Indirector
Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Could not prepare for
execution: Could not autoload puppet/indirecto
Oct 25 18:01:14 mtznjv1pdev01 puppet-agent[7473]: Did you mean?
Puppet::Indirector
Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: puppet.service: Control process
exited, code=exited status=1
Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: Failed to start Puppet agent.
Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: puppet.service: Unit entered
failed state.
Oct 25 18:01:14 mtznjv1pdev01 systemd[1]: puppet.service: Failed with
result 'exit-code'.

and I get the same messages with "journalctl -ex"

So for now my development system is going without a Puppet agent.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0uZKSrWO5uwSTVKrdBLFSeaMyHcYvZ6Fvrj3xZL69A7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet agent fails to start on Ubuntu 16

2016-10-25 Thread Peter Berghold
Seeing some oddness trying to install/start Puppet agent on Ubuntu 16.

Seeing this (by running "journalctl -xe"):

-- Unit puppet.service has begun starting up.
Oct 25 16:19:45 mtznjv1pdev01 puppet-agent[1879]: Could not autoload
puppet/indirector/report/rest: uninitialized cons
Oct 25 16:19:45 mtznjv1pdev01 puppet-agent[1879]: Did you mean?
Puppet::Indirector
Oct 25 16:19:45 mtznjv1pdev01 puppet-agent[1879]: Could not prepare for
execution: Could not autoload puppet/indirecto
Oct 25 16:19:45 mtznjv1pdev01 puppet-agent[1879]: Did you mean?
Puppet::Indirector
Oct 25 16:19:45 mtznjv1pdev01 systemd[1]: puppet.service: Control process
exited, code=exited status=1
Oct 25 16:19:45 mtznjv1pdev01 systemd[1]: Failed to start Puppet agent.

what's up with that?  any thoughts? Missing bean?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1maS81%2BUJG0h%2BonOjBbFiG_3VYvHP_t6NbUDeQnbM7-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Wierd spec error

2016-10-25 Thread Peter Berghold
For some odd reason I am seeing the following error when running spec

Failure/Error: it { should contain_class('munin') }

 NoMethodError:
   undefined method `static_catalogs?' for
#


the manifest it is failing on is merely:

class munin {
}

so this should pass must I'd think  (real work is happening in other
manifests)


I'm running on Ubuntu 16 and there's other wierdness going on but that will
be in another thread.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3wKYoWmv9LG9BPHSR4zOn8u0E-3MOq1Fbdaj%3DzeKxKkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Stubbing functions in Puppet rspec

2016-08-05 Thread Peter Berghold
ooo...  that looks to be an RSpec specification for a custom
type/provider?  I'm going to need that! Thanks!


On Fri, Aug 5, 2016 at 9:13 AM Trevor Vaughan <tvaug...@onyxpoint.com>
wrote:

> Hi Peter,
>
> See if this helps
> https://github.com/onyxpoint/puppet-gpasswd/blob/master/spec/unit/provider/group/gpasswd_spec.rb
>
> Thanks,
>
> Trevor
>
> On Fri, Aug 5, 2016 at 8:04 AM, Peter Berghold <salty.cowd...@gmail.com>
> wrote:
>
>> I have this wonderful module that calls various custom functions that
>> I've written that I'm trying to adopt RSpec testing for.  After seeing it
>> crash and burn with "function unknown" errors I took a rather meandering
>> path and arrived here:
>> https://github.com/TomPoulton/rspec-puppet-unit-testing
>>
>> So I attempted to follow the instructions given and I ended up with a
>> result like this:
>>
>> - 8< snip!   file: spec/classes/init_spec.rb
>> 
>>
>> require 'spec_helper'
>> describe 'ourbind' do
>>
>>   let!(:ipdot2dash) { MockFunction.new('ipdot2dash') { |f|
>>   f.stubbed.with('10.1.2.3').returns('10-1-2-3')
>> }
>>   }
>>   context 'with defaults for all parameters' do
>> it do
>>   ipdot2dash.stubs(:call).with('10.1.2.3').returns('10-1-2-3')
>>   should compile
>>   should contain_class('ourbind')
>>
>> end
>>   end
>> end
>>
>> -- 8< snip! 8<
>> 
>>
>> I run "rake spec" and I get this (at least to me) undecipherable message:
>>
>> --8< error spew
>> 8<---
>>
>> Failure/Error: should compile
>>
>>  Mocha::ExpectationError:
>>unexpected invocation:
>> #.call(['', '21'])
>>satisfied expectations:
>>- allowed any number of times, not yet invoked:
>> #.root?(any_parameters)
>>- allowed any number of times, not yet invoked:
>> #.call('10.1.2.3')
>>- allowed any number of times, not yet invoked:
>> #.execute('10.1.2.3')
>>
>> -8< snip! 8<
>> --
>>
>>
>> Apparently I'm missing something here, what's it trying to tell me and
>> how do I fix it?
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAArvnv2mhr7qyOhgRJWQ%2Bfr9hm88gdhmCB1AYB2aeqq1TFCA%2BA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv2mhr7qyOhgRJWQ%2Bfr9hm88gdhmCB1AYB2aeqq1TFCA%2BA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Trevor Vaughan
> Vice President, Onyx Point, Inc
> (410) 541-6699 x788
>
> -- This account not approved for unencrypted proprietary information --
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVkgH7uz-VkZqiE9ie3pA3oz53dvjj7MPq5xmO2-d9Ysg%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVkgH7uz-VkZqiE9ie3pA3oz53dvjj7MPq5xmO2-d9Ysg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2J0TBXAYuktX_dHBwDXm1HvzEckw32rPH_uZVdWu1P1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Stubbing functions in Puppet rspec

2016-08-05 Thread Peter Berghold
I have this wonderful module that calls various custom functions that I've
written that I'm trying to adopt RSpec testing for.  After seeing it crash
and burn with "function unknown" errors I took a rather meandering path and
arrived here: https://github.com/TomPoulton/rspec-puppet-unit-testing

So I attempted to follow the instructions given and I ended up with a
result like this:

- 8< snip!   file: spec/classes/init_spec.rb


require 'spec_helper'
describe 'ourbind' do

  let!(:ipdot2dash) { MockFunction.new('ipdot2dash') { |f|
  f.stubbed.with('10.1.2.3').returns('10-1-2-3')
}
  }
  context 'with defaults for all parameters' do
it do
  ipdot2dash.stubs(:call).with('10.1.2.3').returns('10-1-2-3')
  should compile
  should contain_class('ourbind')

end
  end
end

-- 8< snip! 8<


I run "rake spec" and I get this (at least to me) undecipherable message:

--8< error spew
8<---

Failure/Error: should compile

 Mocha::ExpectationError:
   unexpected invocation:
#.call(['', '21'])
   satisfied expectations:
   - allowed any number of times, not yet invoked:
#.root?(any_parameters)
   - allowed any number of times, not yet invoked:
#.call('10.1.2.3')
   - allowed any number of times, not yet invoked:
#.execute('10.1.2.3')

-8< snip! 8<
--


Apparently I'm missing something here, what's it trying to tell me and how
do I fix it?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2mhr7qyOhgRJWQ%2Bfr9hm88gdhmCB1AYB2aeqq1TFCA%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Function best approach

2016-07-19 Thread Peter Berghold
Let me preface everything I'm about to say by saying I only started
seriously coding in Ruby about a year ago.  I've been a Perl guy since 1989
 and C/C++ and friends for longer than that so I'm not a total newbie.  The
question I'm going to ask notwithstanding. :-)

What I'm trying to accomplish is writing a function that will parse text
data that will be used as part of a fact, in a custom function for Puppet
and several other places within the Puppet ecosphere.

I've got the parser itself written but I'd hate to think I have to
duplicate that code everywhere it's needed.  What would be the best
approach to making the subroutine available to a custom fact, custom
function and type/provider all at once?

A synopsis of sorts.  The custom fact generates an aggregate fact and the
custom function and custom type/provider compare a parameter fed to a class
to that value to make a logic decision.

Ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1d9fWAqiTxmR8Ku61LPE6u1xkfB-Wpn7fCpHCygCftOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multiple CA setup.

2016-06-08 Thread Peter Berghold
@Dan White:  that link was pretty much what I was looking for.  I take it
then you have openssl sign certs for each master (grand and remote) and
configure Puppet to use those certs.

The tricky part is going to be installing the new certs in production.
Sorta like changing a tire when the car is still moving.

On Wed, Jun 8, 2016 at 10:57 AM Dan White <d_e_wh...@icloud.com> wrote:

> Could the regional masters be set up as intermediate certificate
> authorities ?
> I found a link that describes the basics.
>
> https://jamielinux.com/docs/openssl-certificate-authority/create-the-intermediate-pair.html
>
> Dan White | d_e_wh...@icloud.com
> 
> “Sometimes I think the surest sign that intelligent life exists elsewhere in 
> the universe is that none of it has tried to contact us.”  (Bill Waterson: 
> Calvin & Hobbes)
>
>
> On Jun 08, 2016, at 10:40 AM, Peter Berghold <salty.cowd...@gmail.com>
> wrote:
>
> In the puppet setup that I have where I work it has been increasingly more
> desirable if not required to have each of our data centers be able to
> operate standalone. Because of this I've been Googling around looking for a
> methodology to allow multiple certificate authorities in puppet. Currently
> we have our grand master puppet server in one Data Center and we have
> several Puppet Masters in other data centers in geographically diverse
> areas. When a new client is added with our current setup that new client
> has to reach out and get it certificate signed by The Grandmaster. This is
> getting us through setting up puppet currently but long-term this is
> undesirable.
>
> Can anybody point me to a methodology for setting up multiple certificate
> authorities that actually works? Looks like the pages on the topic I have
> read so far are outdated.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAArvnv2OQP5QcG9TTy_EVTursMkUdW2MhB7%3D_ZPiH7XnQ1mWrQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAArvnv2OQP5QcG9TTy_EVTursMkUdW2MhB7%3D_ZPiH7XnQ1mWrQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/f5735e75-81af-4ab4-820d-3aec36d3157b%40me.com
> <https://groups.google.com/d/msgid/puppet-users/f5735e75-81af-4ab4-820d-3aec36d3157b%40me.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1j8HB4kMBYudN3VOvuFf1S5YXD63Mg4E9A%2BH_YKSf6gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Multiple CA setup.

2016-06-08 Thread Peter Berghold
In the puppet setup that I have where I work it has been increasingly more
desirable if not required to have each of our data centers be able to
operate standalone. Because of this I've been Googling around looking for a
methodology to allow multiple certificate authorities in puppet. Currently
we have our grand master puppet server in one Data Center and we have
several Puppet Masters in other data centers in geographically diverse
areas. When a new client is added with our current setup that new client
has to reach out and get it certificate signed by The Grandmaster. This is
getting us through setting up puppet currently but long-term this is
undesirable.

Can anybody point me to a methodology for setting up multiple certificate
authorities that actually works? Looks like the pages on the topic I have
read so far are outdated.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2OQP5QcG9TTy_EVTursMkUdW2MhB7%3D_ZPiH7XnQ1mWrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Wierd Puppet Master issue

2016-03-23 Thread Peter Berghold
Luckily this doesn't happen all  the time, but I've seen in twice now in
about a year's time on two different Puppet masters.  Here's some
background.

I have in a central location a "Grand Master" that serves only the "Remote
Masters" each located in a different data center.  On the remote masters is
a copy of the Puppet modules and site.pp as it exists on the Grand Master.
Also on each remote master is an RPM repository containing RPMs developed
in house as well as supporting RPMs for Puppet since nothing in production
can talk over the network to anything outside the data center with
exception of the remote master.

These two sets of data get updated during the normal Puppet agent run on
the remote master. Here is a sanitized version of the Puppet classes doing
the work:

file { '/data/repos':
source =>$repo_src,
backup => false,
source_permissions => use,
purge  => true,
recurse=> true,
ignore => '*/repodata/*',
force  => true,
}

file {'/data/puppet-modules':
   source => $src_uri,
backup => false,
purge  => true,
source_permissions => use,
recurse=> true,
force  => true
}

Here's where things get weird.  For the second time this has failed and the
transfer between the grand master and the remote master has hung in mid
session.  In this last case it wasn't until it started to process the RPM
tree that it hung.

Restarting the master process on the grand master did not help. However,
when I stopped the master process and manually started it in debug mode the
problem went away.  This just doesn't make sense to me.


Has anybody else observed this behavior and were you able to resolve it?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1GM3XT1gsQacWWiDT-ZEvxOZ%2BwKwYDJTrULEn3L7vOcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] bizarro error when starting a puppet agent

2016-02-09 Thread Peter Berghold
Thanks for that but it turns out that the team that did the setups didn't
follow the standard operating procedure that I gave them. Somebody tried to
read into what I wrote left a pair of lines in the configuration file that
should have been there.

On Tue, Feb 9, 2016, 08:39 Lowe Schmidt <m...@loweschmidt.se> wrote:

> etckeeper is a tool for managing /etc with a RCS and is not part of the
> Puppet distribution itself.
> It tries to do a commit every time something changed on the filesystem and
> it is failing to do that, I suggest talking to the team that set up the
> machines about how they use etckeeper first
>
> Regards,
>
> --
> Lowe Schmidt | +46 723 867 157
>
> On 5 February 2016 at 23:13, Christopher Wood <christopher_w...@pobox.com>
> wrote:
>
>> It may be useful to provide them with a puppet manifest which configures
>> most of the puppet agent. If all they need to do is "yum install puppet;
>> puppet apply file.pp" that might simplify things from both ends.
>>
>> On Fri, Feb 05, 2016 at 10:00:14PM +, Peter Berghold wrote:
>> >Just the questions you asked prompted me to ask my operators more
>> >questions.   Seems instructions were not followed when they
>> configured
>> >Puppet so a quick correction solved the problem.  Thanks.
>> >On Fri, Feb 5, 2016 at 3:54 PM Peter Berghold <[1]
>> salty.cowd...@gmail.com>
>> >wrote:
>> >
>> >  Puppet version: 3.7.2
>> >  OS Family:  RHEL
>> >  lsbdistdescription => Red Hat Enterprise Linux Server release 6.5
>> >  (Santiago)
>> >  On Fri, Feb 5, 2016 at 2:10 PM Matthaus Owens
>> >  <[2]matth...@puppetlabs.com> wrote:
>> >
>> >Peter,
>> >To allow us to be more helpful, it would be great if you could
>> include
>> >which version of puppet you are installing and from where. From
>> the
>> >problem you describe, I imagine you are installing from debian or
>> >ubuntu.
>> >They include 2 files in their
>> package /etc/puppet/etckeeper-commit-pre
>> >and /etc/puppet/etckeeper-commit-post that are referenced in the
>> >puppet.conf that ships with the package. It looks like etckeeper
>> is
>> >designed to allow someone to version control the etc directory
>> >([3]https://joeyh.name/code/etckeeper/). The error you're seeing
>> >indicates that the file doesn't exist, so there are 2 options to
>> >resolve it.
>> >1. Edit /etc/puppet/puppet.conf to remove or disable the
>> >prerun_command and postrun_command settings.
>> >2. Reinstall the package to try to get the etckeeper-commit-post
>> file
>> >back (this assumes you are using the debian/ubuntu puppet
>> packages)
>> >Another option would be to use the Puppet Labs' apt repositories
>> >instead of debian/ubuntu. We don't ship with those settings on by
>> >default in our packages.
>> >HTH
>> >On Fri, Feb 5, 2016 at 8:18 AM, Peter Berghold
>> ><[4]salty.cowd...@gmail.com> wrote:
>> >
>> >  First a disclaimer:   I am trying to provide support for our
>> >  production team setting up a system as a Puppet agent node and
>> most
>> >  of the work I'm doing is being handled with the operations team
>> >  acting as my voice operated keyboards.
>> >  I handed my operations team instructions on how to install a
>> Puppet
>> >  client on some of our production boxes.  One such box when
>> running
>> >  the agent for the first time issues the following error and
>> the run
>> >  fails:
>> >  "Error: Could not run command from postrun_command: Execution
>> of
>> >  '/etc/puppet/etckeeper-commit-post' retur ned 1: Error: Could
>> not
>> >  execute posix command: No such file or directory -
>> >  /etc/puppet/etckeeper-commit-post"
>> >  Never saw this error before and I'm quite baffled by it.
>> Where is
>> >  this coming from and what is Puppet trying to tell me?
>> >  Thanks in advance.
>> >
>> >  --
>> >  You received this message because you are subscribed to the
>> Google
>> >  Groups "Puppet Users" group.
>> >  To unsubscribe from this

[Puppet Users] bizarro error when starting a puppet agent

2016-02-05 Thread Peter Berghold
First a disclaimer:   I am trying to provide support for our production
team setting up a system as a Puppet agent node and most of the work I'm
doing is being handled with the operations team acting as my voice operated
keyboards.


I handed my operations team instructions on how to install a Puppet client
on some of our production boxes.  One such box when running the agent for
the first time issues the following error and the run fails:

"Error: Could not run command from postrun_command: Execution of
'/etc/puppet/etckeeper-commit-post' retur ned 1: Error: Could not execute
posix command: No such file or directory -
/etc/puppet/etckeeper-commit-post"

Never saw this error before and I'm quite baffled by it.  Where is this
coming from and what is Puppet trying to tell me?


Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2zJrNqO_W3wgeAjWiFmJ%3D%2BJzyohg_is4SQ1_SU153%2BoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] bizarro error when starting a puppet agent

2016-02-05 Thread Peter Berghold
Just the questions you asked prompted me to ask my operators more
questions.   Seems instructions were not followed when they configured
Puppet so a quick correction solved the problem.  Thanks.

On Fri, Feb 5, 2016 at 3:54 PM Peter Berghold <salty.cowd...@gmail.com>
wrote:

> Puppet version: 3.7.2
> OS Family:  RHEL
> lsbdistdescription => Red Hat Enterprise Linux Server release 6.5
> (Santiago)
>
>
> On Fri, Feb 5, 2016 at 2:10 PM Matthaus Owens <matth...@puppetlabs.com>
> wrote:
>
>> Peter,
>>
>> To allow us to be more helpful, it would be great if you could include
>> which version of puppet you are installing and from where. From the problem
>> you describe, I imagine you are installing from debian or ubuntu.
>>
>> They include 2 files in their package /etc/puppet/etckeeper-commit-pre
>> and /etc/puppet/etckeeper-commit-post that are referenced in the
>> puppet.conf that ships with the package. It looks like etckeeper is
>> designed to allow someone to version control the etc directory (
>> https://joeyh.name/code/etckeeper/). The error you're seeing indicates
>> that the file doesn't exist, so there are 2 options to resolve it.
>>
>> 1. Edit /etc/puppet/puppet.conf to remove or disable the prerun_command
>> and postrun_command settings.
>> 2. Reinstall the package to try to get the etckeeper-commit-post file
>> back (this assumes you are using the debian/ubuntu puppet packages)
>>
>> Another option would be to use the Puppet Labs' apt repositories instead
>> of debian/ubuntu. We don't ship with those settings on by default in our
>> packages.
>>
>> HTH
>>
>> On Fri, Feb 5, 2016 at 8:18 AM, Peter Berghold <salty.cowd...@gmail.com>
>> wrote:
>>
>>> First a disclaimer:   I am trying to provide support for our production
>>> team setting up a system as a Puppet agent node and most of the work I'm
>>> doing is being handled with the operations team acting as my voice operated
>>> keyboards.
>>>
>>>
>>> I handed my operations team instructions on how to install a Puppet
>>> client on some of our production boxes.  One such box when running the
>>> agent for the first time issues the following error and the run fails:
>>>
>>> "Error: Could not run command from postrun_command: Execution of
>>> '/etc/puppet/etckeeper-commit-post' retur ned 1: Error: Could not execute
>>> posix command: No such file or directory -
>>> /etc/puppet/etckeeper-commit-post"
>>>
>>> Never saw this error before and I'm quite baffled by it.  Where is this
>>> coming from and what is Puppet trying to tell me?
>>>
>>>
>>> Thanks in advance.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/puppet-users/CAArvnv2zJrNqO_W3wgeAjWiFmJ%3D%2BJzyohg_is4SQ1_SU153%2BoA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv2zJrNqO_W3wgeAjWiFmJ%3D%2BJzyohg_is4SQ1_SU153%2BoA%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Matthaus Owens
>> Puppet Labs
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAekA%2BxkVk-doG3LAsaR%3D1moR2VMd-vk2oLYvU0kEtcJLg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CACD%3DwAekA%2BxkVk-doG3LAsaR%3D1moR2VMd-vk2oLYvU0kEtcJLg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2ajxgCAC%3DxR9ach0NDLBZhhz3vMqNFP6pfL-7yXJkZwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] bizarro error when starting a puppet agent

2016-02-05 Thread Peter Berghold
Puppet version: 3.7.2
OS Family:  RHEL
lsbdistdescription => Red Hat Enterprise Linux Server release 6.5 (Santiago)


On Fri, Feb 5, 2016 at 2:10 PM Matthaus Owens <matth...@puppetlabs.com>
wrote:

> Peter,
>
> To allow us to be more helpful, it would be great if you could include
> which version of puppet you are installing and from where. From the problem
> you describe, I imagine you are installing from debian or ubuntu.
>
> They include 2 files in their package /etc/puppet/etckeeper-commit-pre
> and /etc/puppet/etckeeper-commit-post that are referenced in the
> puppet.conf that ships with the package. It looks like etckeeper is
> designed to allow someone to version control the etc directory (
> https://joeyh.name/code/etckeeper/). The error you're seeing indicates
> that the file doesn't exist, so there are 2 options to resolve it.
>
> 1. Edit /etc/puppet/puppet.conf to remove or disable the prerun_command
> and postrun_command settings.
> 2. Reinstall the package to try to get the etckeeper-commit-post file back
> (this assumes you are using the debian/ubuntu puppet packages)
>
> Another option would be to use the Puppet Labs' apt repositories instead
> of debian/ubuntu. We don't ship with those settings on by default in our
> packages.
>
> HTH
>
> On Fri, Feb 5, 2016 at 8:18 AM, Peter Berghold <salty.cowd...@gmail.com>
> wrote:
>
>> First a disclaimer:   I am trying to provide support for our production
>> team setting up a system as a Puppet agent node and most of the work I'm
>> doing is being handled with the operations team acting as my voice operated
>> keyboards.
>>
>>
>> I handed my operations team instructions on how to install a Puppet
>> client on some of our production boxes.  One such box when running the
>> agent for the first time issues the following error and the run fails:
>>
>> "Error: Could not run command from postrun_command: Execution of
>> '/etc/puppet/etckeeper-commit-post' retur ned 1: Error: Could not execute
>> posix command: No such file or directory -
>> /etc/puppet/etckeeper-commit-post"
>>
>> Never saw this error before and I'm quite baffled by it.  Where is this
>> coming from and what is Puppet trying to tell me?
>>
>>
>> Thanks in advance.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/CAArvnv2zJrNqO_W3wgeAjWiFmJ%3D%2BJzyohg_is4SQ1_SU153%2BoA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/puppet-users/CAArvnv2zJrNqO_W3wgeAjWiFmJ%3D%2BJzyohg_is4SQ1_SU153%2BoA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Matthaus Owens
> Puppet Labs
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAekA%2BxkVk-doG3LAsaR%3D1moR2VMd-vk2oLYvU0kEtcJLg%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CACD%3DwAekA%2BxkVk-doG3LAsaR%3D1moR2VMd-vk2oLYvU0kEtcJLg%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2jYD4WrNXpt_kpJfS44bm-C7SE9%2Bee5e1MfSnksofT6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Custom provider woes and questions

2015-12-07 Thread Peter Berghold
This email has two parts:

First part

Looking at "Sh*t Gary Says" seems to imply I may be going about creating
custom types/providers.  I am currently creating a type under
lib/puppet/type/{typename}.rb without that logic doing anything with the
actual logic being in lib/puppet/provider/{typename}/ruby.rb which has
worked fine for me in the past.

Someone confirm/deny.

Second part

I've created a pair of custom types/providers, one to set parameters and
the other to set state.   The issue I'm running into is the state provider
is trying to work and the parameter provider doesn't even seem to be
loading in Puppet at all without any sort of error showing up.

Here is how they are being invoked in a manifest:

myparmtype { 'instance':
parm1=>'value1',
parm2=>'value2'
}
->
mystatetype{'instance':
   state =>'mystate'
}

Sorry for the obfuscation, but what I'm working on is largely company
proprietary.

Thoughts anybody?

Is there a limit to the number of types/providers a module can have?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv022R2jX5TOdLX1MnqEyfdK8Ep51hWP%3D%2Bhqd1cLN-XaMA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Custom provider woes and questions

2015-12-07 Thread Peter Berghold
Nevermind... figured out what was going on..   and fixed that problem and
now a more bugs to squash...

How do I raise a failed exception in a provider (this before I start
googleing) :-)

On Mon, Dec 7, 2015 at 9:53 AM Peter Berghold <salty.cowd...@gmail.com>
wrote:

> This email has two parts:
>
> First part
>
> Looking at "Sh*t Gary Says" seems to imply I may be going about creating
> custom types/providers.  I am currently creating a type under
> lib/puppet/type/{typename}.rb without that logic doing anything with the
> actual logic being in lib/puppet/provider/{typename}/ruby.rb which has
> worked fine for me in the past.
>
> Someone confirm/deny.
>
> Second part
>
> I've created a pair of custom types/providers, one to set parameters and
> the other to set state.   The issue I'm running into is the state provider
> is trying to work and the parameter provider doesn't even seem to be
> loading in Puppet at all without any sort of error showing up.
>
> Here is how they are being invoked in a manifest:
>
> myparmtype { 'instance':
> parm1=>'value1',
> parm2=>'value2'
> }
> ->
> mystatetype{'instance':
>state =>'mystate'
> }
>
> Sorry for the obfuscation, but what I'm working on is largely company
> proprietary.
>
> Thoughts anybody?
>
> Is there a limit to the number of types/providers a module can have?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv20aBVzYQyU5ifFJQcuVQPEaCp63VntLMMXBBmP9%3D5SRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] "signalling" inside a puppet provider?

2015-12-01 Thread Peter Berghold
Given the following pattern in a puppet manifest:

file{ 'some/file/foo':
  content => 'blah blah blah',
  notify => Exec['talkaboutfoo']
}
exec { 'talkaboutfoo':
 cmd => "some/command/some/where",
 subscribe => File['some/file/foo']
}

with a little bit of hand waving.

Is there something similar in a custom provider?  Reason I'm asking is I
have
written a custom provider for a very customized piece of locally grown
software that ideally one of the configuration parameters

mytype{ 'instance':
 state => "on",  # this parameter
 parm1=> "a",
 parm2=> "b",
 parm3=>"c"
}

should be set *last* among all the other parameters.

Is there a way to do that?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2RBOWHpS4nmX99qjP_OpetGNBP_4am%3D6BxTaGDFZqpdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Still mud-wrestling with spec testing

2015-11-27 Thread Peter Berghold
So,

Now that my schedule has some slack in it I've turned my attention back to
doing spec testing of my Puppet modules.  Taking a really really simple
module that I wrote as an example I started in again.

Here is the one and only file making up the class.

-- init.pp --
class ntp {

  package { 'ntp':
ensure => latest
  }
  service { 'ntp':
ensure  => running,
enable  => true,
require => Package[ntp]
  }


}
-

That should be really easy to run tests against in my opinion.  I wrote a
Gemfle for the occasion.

-Gemfile---
source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" :
['>= 3.3']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0'
gem 'rake','>= 0.0.0'
gem 'spec','>= 0.0.0'

and my spec file looks like this:

--- spec/classes/init_spec.rb ---
require 'spec_helper'
describe 'ntp', :type => 'class' do

  context 'On Debian' do
let :facts do {
 :osfamily => 'Debian'
}
end

  it {
should contain_package('ntp').with({ 'name' =>  'ntp' })
should contain_service('ntp').with({ 'name' => 'ntp' })
  }
end

end
---

and when I run "rake spec" I get this (severely trimmed) set of errors:
-errors--
 1) ntp On Debian should contain Package[ntp] with name => "ntp"
 Failure/Error: should contain_package('ntp').with({ 'name' =>  'ntp' })

 ArgumentError:
   wrong number of arguments (2 for 1)


Looks to me after reading "The Next Generation of Puppet Module Testing"
 at this page:
https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing
there should only be one argument to  "with" so.. if that's not an
authoritative page for that information, which one is?

Can somebody clarify for me what;s going on here?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0%3DEobRO49%3DhYNuf6D2e2feN4md2rFqmx%2BGySCNByhtCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Beaker Platforms?

2015-11-19 Thread Peter Berghold
I have a beaker hosts file that looks like this:

HOSTS:
  debian-8:
platform: debian/jessie
image: debian:8
hypervisor: docker
CONFIG:
  type: foss

when I run beaker --hosts it chokes on every permutation of debian platform
designation I can think of with this sort of error message:

/var/lib/gems/1.9.1/gems/beaker-2.29.0/lib/beaker/platform.rb:64:in
`initialize': Unsupported platform name debian:jessie (ArgumentError)

So the question I have is if I want to designate debian 8.x as my platform,
what the heck do I put there?


Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0B2V8JOrrvu1fZrhcXgp9_VaHDr6hgo7cobeLdAsvBkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs-postgresql and puppetlabs-mysql fail with similar (same?) error

2015-08-09 Thread Peter Berghold
I'll focus on the mysql module first.   I assigned the ::mysql::server
class to one of my hosts expecting mysql server to get loaded and this
happened instead:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Unknown function pick at
/etc/puppet/environments/production/modules/mysql/manifests/server/config.pp:22
on node

earlier in the day with a different host I saw the same function get called
out for the puppetlabs-postgresql module as not being found.

Here is the affected line in the msyql;:server::config class.

  $logbin = pick($options['mysqld']['log-bin'],
$options['mysqld']['log_bin'], false)

where was this function supposed to have come from?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2xKZ8V-h17ann_rNPG1mEzqMhOs5mZ0NUbgfdFjaeCaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Module spec testing

2015-08-04 Thread Peter Berghold
Is there a newer set of documents on doing Spec testing of Puppet modules
than this link?
https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing

I am running into a brick wall getting this to work so I have to assume I'm
doing something wrong...

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv14GJ0v6Ef0rS4KAcrOf1C%3DUiu%3DpM%2BsnJcxjsptqeipCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] fileserver.conf -- files not serving

2015-07-28 Thread Peter Berghold
Wouldn't thar collide with the Puppet master process listening on 8140?

On Tue, Jul 28, 2015, 10:25 Jonathan Gazeley jonathan.gaze...@bristol.ac.uk
wrote:

  You could consider running SSH or rsync on port 8140...

 Cheers,
 Jonathan



 On 27/07/15 19:58, Peter Berghold wrote:

 Hi there,

  I am trying to keep Puppet modules in sync between Puppet masters in an
 environment where SSH is being blocked between the masters (long story
 there, corporate security rules), Git and other such are not an option but
 I can use port 8140 between them.

  So I set up a fileserver.conf like thus:

  [data]
   path=/data
   allow *

  and added this to the auth.conf file:

  path ~ ^/file_(metadata|content)s?/data/
 auth yes
 allow *

  and one of the classes managing this looks like:
  class puppet::master::classdir {
   include puppet::params
   $src_uri = 'puppet:///data/puppet-modules'

file { '/data/puppet-modules':
 source  = $src_uri,
 owner   = root,
 group   = root,
 mode= '0755',
 recurse = true
   }
 }

  and when the Puppet agent runs I see this:

  Error: /Stage[main]/Puppet::Master::Classdir/File[/data/puppet-modules]:
 Failed to generate additional resources using 'eval_generate': Error 400 on
 SERVER: Not authorized to call search on /file_metadata/data/puppet-modules
 with {:recurse=true, :checksum_type=md5, :links=manage}
 Error: /Stage[main]/Puppet::Master::Classdir/File[/data/puppet-modules]:
 Could not evaluate: Could not retrieve file metadata for
 puppet:///data/puppet-modules: Error 400 on SERVER: Not authorized to call
 find on /file_metadata/data/puppet-modules with
 {:source_permissions=use, :links=manage}
 Wrapped exception:
 Error 400 on SERVER: Not authorized to call find on
 /file_metadata/data/puppet-modules with {:source_permissions=use,
 :links=manage}


  OK.. so what am I missing here?

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0V2GxEh_6kVB54VWf11MrX7LN5javu9ipL5T6r40kVaw%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0V2GxEh_6kVB54VWf11MrX7LN5javu9ipL5T6r40kVaw%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/55B790D7.2030807%40bristol.ac.uk
 https://groups.google.com/d/msgid/puppet-users/55B790D7.2030807%40bristol.ac.uk?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv07zRGxSJ74Pge2eAqpfRq-fbhWc3H_WBfP%3D%2BkpNGB3Lw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] fileserver.conf -- files not serving

2015-07-28 Thread Peter Berghold
Solved it.  Had to play with /etc/puppet/auth.conf to get it to work.  I've
published a blog page about it.
http://puppet-blog.berghold.net/?p=28#more-28


On Tue, Jul 28, 2015 at 11:45 AM Peter Berghold salty.cowd...@gmail.com
wrote:

 Wouldn't thar collide with the Puppet master process listening on 8140?

 On Tue, Jul 28, 2015, 10:25 Jonathan Gazeley 
 jonathan.gaze...@bristol.ac.uk wrote:

  You could consider running SSH or rsync on port 8140...

 Cheers,
 Jonathan



 On 27/07/15 19:58, Peter Berghold wrote:

 Hi there,

  I am trying to keep Puppet modules in sync between Puppet masters in an
 environment where SSH is being blocked between the masters (long story
 there, corporate security rules), Git and other such are not an option but
 I can use port 8140 between them.

  So I set up a fileserver.conf like thus:

  [data]
   path=/data
   allow *

  and added this to the auth.conf file:

  path ~ ^/file_(metadata|content)s?/data/
 auth yes
 allow *

  and one of the classes managing this looks like:
  class puppet::master::classdir {
   include puppet::params
   $src_uri = 'puppet:///data/puppet-modules'

file { '/data/puppet-modules':
 source  = $src_uri,
 owner   = root,
 group   = root,
 mode= '0755',
 recurse = true
   }
 }

  and when the Puppet agent runs I see this:

  Error:
 /Stage[main]/Puppet::Master::Classdir/File[/data/puppet-modules]: Failed to
 generate additional resources using 'eval_generate': Error 400 on SERVER:
 Not authorized to call search on /file_metadata/data/puppet-modules with
 {:recurse=true, :checksum_type=md5, :links=manage}
 Error: /Stage[main]/Puppet::Master::Classdir/File[/data/puppet-modules]:
 Could not evaluate: Could not retrieve file metadata for
 puppet:///data/puppet-modules: Error 400 on SERVER: Not authorized to call
 find on /file_metadata/data/puppet-modules with
 {:source_permissions=use, :links=manage}
 Wrapped exception:
 Error 400 on SERVER: Not authorized to call find on
 /file_metadata/data/puppet-modules with {:source_permissions=use,
 :links=manage}


  OK.. so what am I missing here?

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0V2GxEh_6kVB54VWf11MrX7LN5javu9ipL5T6r40kVaw%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0V2GxEh_6kVB54VWf11MrX7LN5javu9ipL5T6r40kVaw%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/55B790D7.2030807%40bristol.ac.uk
 https://groups.google.com/d/msgid/puppet-users/55B790D7.2030807%40bristol.ac.uk?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0REiZiXCnh7wNfx2ajNQDvZC0t-YWe8wOkqf%3Dw1mPO3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] fileserver.conf -- files not serving

2015-07-27 Thread Peter Berghold
Hi there,

I am trying to keep Puppet modules in sync between Puppet masters in an
environment where SSH is being blocked between the masters (long story
there, corporate security rules), Git and other such are not an option but
I can use port 8140 between them.

So I set up a fileserver.conf like thus:

[data]
  path=/data
  allow *

and added this to the auth.conf file:

path ~ ^/file_(metadata|content)s?/data/
auth yes
allow *

and one of the classes managing this looks like:
class puppet::master::classdir {
  include puppet::params
  $src_uri = 'puppet:///data/puppet-modules'

  file { '/data/puppet-modules':
source  = $src_uri,
owner   = root,
group   = root,
mode= '0755',
recurse = true
  }
}

and when the Puppet agent runs I see this:

Error: /Stage[main]/Puppet::Master::Classdir/File[/data/puppet-modules]:
Failed to generate additional resources using 'eval_generate': Error 400 on
SERVER: Not authorized to call search on /file_metadata/data/puppet-modules
with {:recurse=true, :checksum_type=md5, :links=manage}
Error: /Stage[main]/Puppet::Master::Classdir/File[/data/puppet-modules]:
Could not evaluate: Could not retrieve file metadata for
puppet:///data/puppet-modules: Error 400 on SERVER: Not authorized to call
find on /file_metadata/data/puppet-modules with
{:source_permissions=use, :links=manage}
Wrapped exception:
Error 400 on SERVER: Not authorized to call find on
/file_metadata/data/puppet-modules with {:source_permissions=use,
:links=manage}


OK.. so what am I missing here?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0V2GxEh_6kVB54VWf11MrX7LN5javu9ipL5T6r40kVaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Case of the missing Ruby file

2015-07-20 Thread Peter Berghold
Hi folks,

I've bravely stepped out into the world of writing tests for my Puppet
modules to ensure code quality.  Have run into an issue.  My
spec/spec_helper.rb has one line.

require 'puppetlabs_spec_helper/module_spec_helper'

I run rake spec and this happens:

spec/spec_helper.rb:1:in `require': no such file to load --
puppetlabs_spec_helper/module_spec_helper (LoadError)
from /home/pb869e/src/pb869e-attbind/spec/spec_helper.rb:1
-- and more---

I did a  find /usr -name  module_spec_helper.rb  and it shows up here:
/usr/lib/ruby/gems/1.8/gems/puppetlabs_spec_helper-0.10.3/lib/puppetlabs_spec_helper/module_spec_helper.rb

so why isn't it loading?

thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2-4L5qM4iLvNmnjXEAKs2Xi79SJDxqwmWOfKZj-%2BCPeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Newbie question regarding the file resource

2015-07-20 Thread Peter Berghold
I think I understand what you are driving at, and your logic seems good to
me.  When I was doing web hosting for people I had a class that handled
installing and configuring Apache and a separate module called sites that
handled setting up the web sites using the apache::vhost define that
contained the logic to set up a VirtualHost definition file and create the
DocRoot directory.

The difference was I was using templates and synthesizing the configuration
file based on some parameters passed to the define.

HTH.

On Mon, Jul 20, 2015 at 12:18 PM Fabien Delpierre 
fabien.delpie...@gmail.com wrote:

 Hi folks,
 I'm super new to Puppet but decently experienced with Chef, I'm trying to
 apply my Chef logic to some things I'm trying to do in Puppet but I've hit
 what is probably a simple snag. And perhaps I shouldn't be trying to apply
 Chef logic, but hear me out first!

 Firstly, I'm following along John Arundel's book, *Puppet 3 Beginner's
 Guide*. It's had me create a module to do my own things, as well as a
 separate module that just installs Nginx, and now it's trying to set up a
 basic website by providing a virtual host file and writing it to
 /etc/nginx/sites-enabled. The way it's having me do that is to invoke the
 file resource directly from within my nginx class/module. I know that
 will work, but that seems like heresy.

 In my Chef logic, I would create a cookbook just to set up my website,
 have it invoke an external cookbook to install Nginx, and then simply drop
 the Nginx config file in the right spot, like so:

 include_recipe nginx::default

 cookbook_file /var/www/mysite/index.html
 cookbook_file /etc/nginx/sites-enabled/mysite.conf

 That separates the process of just installing Nginx (which my simpleton
 Nginx class is doing just fine) from setting up the website.

 What I have so far in Puppet looks like this:

 mysite
 -files
 --mysite.conf

 -manifests
 --default.pp
 --nodes.pp

 -modules
 --nginx
 ---manifests
 init.pp

 The book wants me to add a files directory under nginx and put the
 mysite.conf there. But in my logic, the nginx class is an external
 dependency -- or at least, going forward, I would actually use the
 official Nginx module and call it from my custom module somehow, so
 assuming the Nginx module is its own entity that I cannot change, I'd have
 to find a way to write mysite.conf directly from my custom module.

 My nodes.pp looks like this:

 node 'sensei-debian7' {

   include nginx

   file { /var/www/mysite/index.html:
 content = Hello?\n,
   }

   file { [/var/www, /var/www/mysite]:
 ensure = directory
   }

   file { /etc/nginx/sites-enabled/default:
 source = 'puppet:///sensei/mysite.conf',
 notify = Service['nginx'],
   }
 }

 That source attribute above is my problem. sensei is the name of my
 learning module. I'm using Vagrant for testing, and when I run vagrant
 provision, Puppet complains that it cannot find the path:
 == debian7: Error:
 /Stage[main]/Main/Node[sensei-debian7]/File[/etc/nginx/sites-enabled/default]:
 Could not evaluate: Could not retrieve information from environment
 production source(s) puppet:///sensei/mysite.conf

 Like I said, the book would like me to put the mysite.conf in
 modules/nginx/files/mysite.conf and have the following source line:
 source = 'puppet:///modules/nginx/mysite.conf',
 I'm sure that that would work, but since it feels wrong to do it that way,
 I'm trying to write that line correctly so that it fetches the mysite.conf
 directly from my module, without going to the Nginx module at all.
 I've tried multiple things:
 puppet:///modules/sensei/mysite.conf
 puppet:///sensei/mysite.conf
 puppet:///files/mysite.conf (I figured that wouldn't work since I
 understand Puppet adds the files/ in those instances)
 puppet:///mysite.conf
 and others. But nothing works.

 I hope this makes sense.
 So, I don't know if I'm going about this all wrong or if I just need to
 find the right syntax for that source line. If this is all wrong, then
 what's the right way of doing it?
 Let's assume that, later on, I might move my Nginx module to its own Git
 repo and invoke it from my Sensei module using a Puppetfile/Librarian.

 Thanks for reading, and any pointers would be appreciated!

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/6e3e084d-700d-4d84-ba89-0e27524aec3d%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/6e3e084d-700d-4d84-ba89-0e27524aec3d%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, 

[Puppet Users] Puppet parser function woes

2015-07-07 Thread Peter Berghold
I've written a parser function to scrape a website looking for the newest
version of a package I want loaded on my laptop.  I'm getting really wonky
results.

Here's the function in all its glory completely un-edited:
require 'net/https'
require rexml/document
require 'sanitize'


module Puppet::Parser::Functions
  newfunction(:latest_makehuman_unstable, :type = :rvalue, :doc = -EOS
This function interrogates the MakeHuman nightly builds site to detect
the newest version of MakeHuman for download.

Returns the deb package name
EOS
 ) do |args|


stripped=Sanitize.clean(fetch_download_list())
lines = stripped.split(/\n/);
deblist=lines.grep(/x-debian/)
wanted = deblist.last.split(/.deb/).first + .deb
  end

end

def fetch_download_list
  begin
http = Net::HTTP.new(download.tuxfamily.org,80)
http.use_ssl = false
http.start do |http|
  req = Net::HTTP::Get.new(makehuman/nightly/,
   {User-Agent =
juretta.com RubyLicious 0.2})
  response = http.request(req)
  response.body

end
end

It is supposed to return the name of the latest .deb file listed on the
website.  This (I thought) should be a no-brainer.  Instead I get this:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
undefined local variable or method `resp' for
Scope(Class[Apps::Modelling::Makehuman]):Puppet::Parser::Scope at
/etc/puppet/environments/production/modules/apps/manifests/modelling/makehuman.pp:41
on node saltycowdawg.tfl.berghold.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The variable it is complaining about does not exist!  What the heck?

Any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1nHpn6RoY5F%3DcNM_%3DzU2ft1Gir_3QL-McYcBOaTGzpmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs-apache and mod_jk

2015-06-29 Thread Peter Berghold
Does the apache::vhost facility in puppetlabs-apache support mod_jk
redirects in some fashion I'm missing?

I'm about to use this module (along with a couple of others) to set up
Jenkins on a server of mine for purely research purposes...

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0SQdxkGS6nva3y6%3DNFwjcCJXbEZ276GZn0_OJB%2BUBP6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet ignoring hiera

2015-06-18 Thread Peter Berghold
I'm sure I've forgotten something here, but in a Vagrant VM I have set up a
test environment to test some stuff before bringing into my Puppet
environment.

Here's my puppet.conf file.  Very minimal:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
hiera_config = /etc/puppet/hiera.yaml

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

Here is the hiera.yaml file:
---
:backends:
  - yaml
:hierarchy:
  - defaults
  - nodes/%{fqdn}
  - %{clientcert}
  - %{environment}
  - global

:yaml:
# datadir is empty here, so hiera uses its defaults:
# - /var/lib/hiera on *nix
# - %CommonAppData%\PuppetLabs\hiera\var on Windows
# When specifying a datadir, make sure the directory exists.
  :datadir: /etc/puppet/hiera

and here is the global.yaml
---
classes:
  - puppet::agent

Pretty simple stuff.   However the puppet::agent class is not being applied
to any of the hosts during agent run.

So... what am I missing here?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2y58pdpxcsvbozrnieig%3D9yqz-bWEispH7sFxact1Xhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] odd new error with puppet version 3.8.1

2015-05-27 Thread Peter Berghold
Ever since I upgraded to Puppet version 3.8.1 I now see this error:
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not
retrieve information from environment production source(s) puppet://
mcadprod1.mca.sharkrivertech.com/pluginfacts


What's that about?  Should I worry.  Something need configuring?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv22FAx8RumyP2WyFo%3DMzPx%3DLoGs2RMEO%2BpKBbMnyC%3DdwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] nudge in the right direction needed: BFA and puppetlabs-firewall

2015-05-12 Thread Peter Berghold
Hey folks,

I'm trying to figure out how to code rules in puppetlabs-firewall to
mitigate Brew Force Attacks (BFA) and can't figure out how to code it.

Here is the pattern I'm trying to code:

$ sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state
NEW -m recent --set --name SSH
$ sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state
NEW -m recent --update --seconds 60 --hitcount 8 --rttl --name SSH -j
DROP


Looking at the source code for the type and provider would lead me to
belive that all the pieces are their but who to assemble them I
haven't been able to guess at.


Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv15UB7JPDdVQVHZyRP%2BW30H1CHahD-KaV%3DSm5w0i7CN-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] nudge in the right direction needed: BFA and puppetlabs-firewall

2015-05-12 Thread Peter Berghold
yeah... using fail2ban right now and I'm not 100% pleased with it.  I had
to employ a hack to get Puppet and fail2ban to get along and I'm not always
convinced it does what it should.


On Tue, May 12, 2015 at 10:30 AM Christopher Wood 
christopher_w...@pobox.com wrote:

 Possibly you mean brute-force attacks?

 I find fail2ban useful for this sort of thing, since this is not
 exclusively a firewall issue:

 http://en.wikipedia.org/wiki/Fail2ban

 That said I haven't ever crossed this with a puppet-managed firewall.

 On Tue, May 12, 2015 at 02:17:59PM +, Peter Berghold wrote:
 Hey folks,
 I'm trying to figure out how to code rules in puppetlabs-firewall to
 mitigate Brew Force Attacks (BFA) and can't figure out how to code it.
 Here is the pattern I'm trying to code:
 
   $ sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW
 -m recent --set --name SSH
   $ sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW
 -m recent --update --seconds 60 --hitcount 8 --rttl --name SSH -j DROP
 
   Looking at the source code for the type and provider would lead me to
 belive that all the pieces are their but who to assemble them I haven't
 been able to guess at.
 
   Thanks in advance.
 
 --
 You received this message because you are subscribed to the Google
 Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it,
 send an
 email to [1]puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 [2]
 https://groups.google.com/d/msgid/puppet-users/CAArvnv15UB7JPDdVQVHZyRP%2BW30H1CHahD-KaV%3DSm5w0i7CN-Q%40mail.gmail.com
 .
 For more options, visit [3]https://groups.google.com/d/optout.
 
  References
 
 Visible links
 1. mailto:puppet-users+unsubscr...@googlegroups.com
 2.
 https://groups.google.com/d/msgid/puppet-users/CAArvnv15UB7JPDdVQVHZyRP%2BW30H1CHahD-KaV%3DSm5w0i7CN-Q%40mail.gmail.com?utm_medium=emailutm_source=footer
 3. https://groups.google.com/d/optout

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/20150512143018.GA27324%40iniquitous.heresiarch.ca
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0Cra8Pe6GK%3DPkM-9%2B_ZKomfnDZXubdbWB_%3D%3DPW%2BextDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] marking last modified time in a template

2015-05-06 Thread Peter Berghold
my first answer to this was to look at the file modification time.  For
whatever reason they wanted to know if I could add a line saying something
on the order of Last Modified By Puppet:  date.

I'm just going to tell them they're nuts.


On Wed, May 6, 2015 at 2:59 PM Dan White d_e_wh...@icloud.com wrote:

 If Puppet manages the file, then the file's mod time is the time in
 question. Why do they want it IN the file ?

 Sometimes I think the surest sign that intelligent life exists elsewhere
 in the universe is that none of it has tried to contact us.

 Bill Waterson (Calvin  Hobbes)

 On May 6, 2015, at 2:31 PM, Peter Berghold salty.cowd...@gmail.com
 wrote:

 I  use templates to manage a slew of configuration files.  One request
 from my end user community (Operations folks) was to have Puppet mark the
 last time a file was modified by Puppet as a comment in the file.

 Seems like a Heisenburg problem to me.  Just marking a time date inside
 a template would make a change it would seem to me.


 Or am I wrong?

 Comments please.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAArvnv25Wdh9wVCArYMb-C_EQpkCifGRx%3D0w-0tB6WtrO7WAhQ%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAArvnv25Wdh9wVCArYMb-C_EQpkCifGRx%3D0w-0tB6WtrO7WAhQ%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/29C0D452-EDAA-42FC-A885-EC0D4DECC177%40icloud.com
 https://groups.google.com/d/msgid/puppet-users/29C0D452-EDAA-42FC-A885-EC0D4DECC177%40icloud.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2M%2BPRH0CiU%2BGuaAssbPVE5PWWKLrSdHsazELEJpsoznA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] marking last modified time in a template

2015-05-06 Thread Peter Berghold
I  use templates to manage a slew of configuration files.  One request from
my end user community (Operations folks) was to have Puppet mark the last
time a file was modified by Puppet as a comment in the file.

Seems like a Heisenburg problem to me.  Just marking a time date inside
a template would make a change it would seem to me.


Or am I wrong?

Comments please.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv25Wdh9wVCArYMb-C_EQpkCifGRx%3D0w-0tB6WtrO7WAhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet module testing

2015-04-07 Thread Peter Berghold
Is there a definitive guide somewhere that would guide me as to how to
write Puppet module tests?  In particular I'm interested in learning how to
write a tasklist file.

I keep seeing mention of such but nothing that helps...

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3ZReYbJFNB29hOhFYhk7fRKP%3DhrY-ViFesBC%3DRAiyy%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Issue with puppet 3.7.5 and augeas

2015-04-03 Thread Peter Berghold
Just this morning the Puppet agent got updated to 3.7.5.  Now when classes
that use Augeas are applied to hosts I see this:

Error: Could not find a suitable provider for augeas


Is there a workaround/fix for this?  I'm on the Debian wheezy platform.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1At3cLMmLhV%3DSnpBW7aOyaxAjuwik-kJK2TE1-W%2BTYJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
I need a push in the right direction.  I have a need to have a subset of
hosts in my environment register themselves to receive rsync updates from
a central host.  I realize that the right approach is exported resources
but I'm getting stuck on the actual implementation.

Here is what I tried:

in one module

define registerhost() {
 include parms
 concat::fragment($fqdn fragment:
   content = ${fqdn},
   target=${parms::filenmae}
  }
}

and elsewhere

@@registerhost {${fqdn}: }

and then to marshal the resources

concat { ${parms::filename}:
  ensure = present,
   backup= true,
   owner = root, group= root, mode = 0644
  }

  Registerhost ||

What I'm seeing is
/usr/local/etc/remote-masters.txt]/returns: The fragments directory is
empty, cowardly refusing to make empty config files


I watched the puppetdb log and it would seem something is being written to
puppetdb and puppetdb is the backend for storeconfigs.

so... suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv22a%3DOf_5XX%3DPocetco_pLKt89%3DHNsrhc5Fny5kgwhpRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
puppetdbquery looks worth looking into...

On Thu, Mar 26, 2015 at 4:07 PM Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 On 03/26/2015 07:39 PM, Peter Berghold wrote:
 
  I guess you can't export such a thing?

 You can. But your define is not called 'remotemaster'. Perhaps that is
 the cause of the error.

 Cheers,
 Felix

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/551466F6.9090807%40Alumni.TU-Berlin.de.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2qBvKZUG9d_roD8XYAJpEZ8_xN-FPwEAZ6mwFGpTzgcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
OK... excuse me for being a bit dense... but how do you install this thing?
 i've unzipped it and it isn't very obvious to me...

On Thu, Mar 26, 2015 at 4:47 PM Peter Berghold salty.cowd...@gmail.com
wrote:

 puppetdbquery looks worth looking into...

 On Thu, Mar 26, 2015 at 4:07 PM Felix Frank 
 felix.fr...@alumni.tu-berlin.de wrote:

 On 03/26/2015 07:39 PM, Peter Berghold wrote:
 
  I guess you can't export such a thing?

 You can. But your define is not called 'remotemaster'. Perhaps that is
 the cause of the error.

 Cheers,
 Felix

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/puppet-users/551466F6.9090807%40Alumni.TU-Berlin.de.
 For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3PyH1qhj2m%2BSPB%2BwOqe09oVsHp%2Bq8XEc6NW3KOxH7iJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Creating a list of hosts

2015-03-26 Thread Peter Berghold
Ok... I thought so... thanks

On Thu, Mar 26, 2015, 18:18 Jeffrey Watts jeffrey.w.wa...@gmail.com wrote:

 Put the puppetdb directory in /etc/puppet/modules.

 Good luck.
 Jeffrey.


 On Thu, Mar 26, 2015 at 3:58 PM, Peter Berghold salty.cowd...@gmail.com
 wrote:

 OK... excuse me for being a bit dense... but how do you install this
 thing?  i've unzipped it and it isn't very obvious to me...


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAMvPdm0pmOYTcVZqjJUxXAN553e%3DiRoXCfrxL-8kU9zeCx6DYQ%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAMvPdm0pmOYTcVZqjJUxXAN553e%3DiRoXCfrxL-8kU9zeCx6DYQ%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1txzeotzwEMg_yDVk0T%3DhYNnUJRMvvSkTN5g2N7HrgPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: How can I diagnose hopeless performance.

2015-03-20 Thread Peter Berghold
On Fri, Mar 20, 2015 at 4:18 AM jamese james.eckers...@gmail.com wrote:

 Try running puppet with --debug and --evaltrace to see where it's
 taking the time.
 I'd be looking at DNS as that is often the culprit for unexplained things.

 --


A tale I tell is where Puppet was taking three or more minutes to even
begin to do anything.   This was on an RHEL platform and it turned out my
support guys has RHN configured to look for an RPM repository that was
unreachable due to network restrictions.

I removed the RHN plugin to yum and Puppet began to function normally.

Just throwing that out there...

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1nfPkQpWNA-by2ozYAWNAUGznpFdoAdsSgQyk0Oh0Rfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Questions about PE

2015-03-18 Thread Peter Berghold
Thanks for the answers.  I'll be having my support team build me another VM
to evaluate PE on.  Wish we had gone this way six months ago.

On Tue, Mar 17, 2015 at 10:00 PM Rilindo Foster rili...@gmail.com wrote:

 1) Does it work with Foreman?

 Yes, though if you are not using Foreman for anything other than Reporting
 and ENC, Puppet's console is pretty capable as a replacement.

  2) Can it be installed from an internal RPM repository?

 Yes. There is a Foreman repo you'll need to sync for the base packages. In
 addition, you need the following repositories available for Foreman to
 resolve its dependencies:

 - EPEL
 - Red Hat SCL
 - Red Hat Optional channel/packages (I don't recall the exact name).

  3) If it doesn't work with Foreman is there an equivalent ENC and front
 end for PE?

 Like I said, the Puppet console is pretty capable. I would suggest
 downloading an evaluation copy from PuppetLabs and get it deployed in your
 dev envionment (or even in your personal VM). They made it very easy to get
 it up and running.

  - Rilindo



 On 03/17/2015 11:49 AM, Peter Berghold wrote:

 HI folks,

  Six months into my project to bring Foreman/Puppet into my work
 environment someone has asked the question Hey! Can we get a licensed
 version of this with support?   My answer, sure... where's the funding?

  That aside I have some questions about Puppet Enterprise:

  1) Does it work with Foreman?
 2) Can it be installed from an internal RPM repository?

  The platform this will happen on is RHEL 6 (possibly 7 in the future).

  3) If it doesn't work with Foreman is there an equivalent ENC and front
 end for PE?

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAArvnv1G6OKzvgcr%2BZtJL6WreMyYsDqvTSKWmv%3DCBt4iK01E%2Bw%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAArvnv1G6OKzvgcr%2BZtJL6WreMyYsDqvTSKWmv%3DCBt4iK01E%2Bw%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/5508DC14.9030809%40gmail.com
 https://groups.google.com/d/msgid/puppet-users/5508DC14.9030809%40gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv20V_FW_B6yvG3EWAgP24DrgFbkRpUP25QOTpGXJhGw_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Questions about PE

2015-03-17 Thread Peter Berghold
HI folks,

Six months into my project to bring Foreman/Puppet into my work environment
someone has asked the question Hey! Can we get a licensed version of this
with support?   My answer, sure... where's the funding?

That aside I have some questions about Puppet Enterprise:

1) Does it work with Foreman?
2) Can it be installed from an internal RPM repository?

The platform this will happen on is RHEL 6 (possibly 7 in the future).

3) If it doesn't work with Foreman is there an equivalent ENC and front end
for PE?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1G6OKzvgcr%2BZtJL6WreMyYsDqvTSKWmv%3DCBt4iK01E%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [foreman-users] Re: Reports not showing up in foreman.

2015-03-05 Thread Peter Berghold
now I'm mad at myself I must have read that doc ten times in the last
week and missed that very important point.


Good news is my module for managing the configuration of the Remote Masters
now includes that tidbit.

On Thu, Mar 5, 2015 at 9:58 AM Nick Howes nickho...@gmail.com wrote:

 Facts are probably coming in as Foreman is the ENC (the node.rb script).
 Reports definitely should work, so something seems amiss.

 Is there a foreman.rb in your Puppet installation on the subordinate
 masters? It could be in a number of places depending on your Ruby
 installation. This is the script that is used when reports is set to
 foreman. If you use foreman-installer this probably gets done for you,
 otherwise you need to follow the docs as per the link below. If this is the
 problem then I'm surprised the master didn't complain loudly. Try enabling
 debug logging for the master if you haven't already.

 http://theforeman.org/manuals/1.3/index.html#3.5.4PuppetReports

 # find /usr/share -name foreman.rb
 /usr/share/ruby/vendor_ruby/puppet/reports/foreman.rb




 On Wednesday, 4 March 2015 16:46:25 UTC, Salty Old Cowdawg wrote:

 I'm going to re-ask this question because the issue is driving me crazy
 even though I'm already close enough to walk.

 Here's the setup:
  [Foreman Server with Puppet/PuppetDB]
  ^
   |
  V
   [ Subordinate (remote) Puppet Server ] (Proxy installed)
   ^
|
V
[End client[

 The Puppet master running on the Foreman host's job is to manage just the
 remote masters.  The subordinate Puppet Masters are planned to be installed
 in various data centers around the country.

 The end client's puppet.conf looks like this (with the template variables
 being replaced by their actual values):

 ### File managed with puppet ###
 ## Module:   'puppet'

 [main]
 # The Puppet log directory.
 # The default value is '$vardir/log'.
 logdir = /var/log/puppet

 # Where Puppet PID files are kept.
 # The default value is '$vardir/run'.
 rundir = /var/run/puppet

 # Where SSL certificates are kept.
 # The default value is '$confdir/ssl'.
 ssldir = $vardir/ssl

 # Allow services in the 'puppet' group to access key (Foreman + proxy)
 privatekeydir = $ssldir/private_keys { group = service }
 hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

 # Puppet 3.0.x requires this in both [main] and [master] - harmless
 on agents
 autosign   = $confdir/autosign.conf { mode = 664 }

 show_diff = false

 hiera_config = $confdir/hiera.yaml


ca_server =%= foreman_host_fqdn%


 ### Next part of the file is managed by a different template ###
 ## Module:   'puppet'

 [agent]
 # The file in which puppetd stores a list of the classes
 # associated with the retrieved configuration.  Can be loaded in
 # the separate ``puppet`` executable using the ``--loadclasses``
 # option.
 # The default value is '$statedir/classes.txt'.
 classfile = $vardir/classes.txt

 # Where puppetd caches the local configuration.  An
 # extension indicating the cache format is added automatically.
 # The default value is '$confdir/localconfig'.
 localconfig = $vardir/localconfig

 # Disable the default schedules as they cause continual skipped
 # resources to be displayed in Foreman - only for Puppet = 3.4
 default_schedules = false

 report= true
 pluginsync= true
 masterport= 8140
 environment   = POC
 certname  = %= fqdn %
 server= %= puppethost_fqdn %
 listen= false
 splay = false
 splaylimit= 1800
 runinterval   = 1800
 noop  = false
 configtimeout = 600

 Report is turned on and the remote Puppet Master is successfully managing
 the client.

 The [master] section of the remote Puppet Master's puppet.conf looks like
 this:
 [master]
 storeconfigs = true
 storeconfigs_backend = puppetdb
 autosign   = $confdir/autosign.conf { mode = 664 }
 reports= foreman
 external_nodes = /etc/puppet/node.rb
 node_terminus  = exec

 ca = false


 certname   = %= fqdn %
 strict_variables = false

 environmentpath  = /etc/puppet/environments
 basemodulepath   = /etc/puppet/environments/
 common:/etc/puppet/modules:/usr/share/puppet/modules

 and I have a foreman.yaml file that looks like this:

 ---
 # Update for your Foreman and Puppet master hostname(s)
 :url: https://mtinjacn01.cip.att.com;
 :ssl_ca: /var/lib/puppet/ssl/certs/ca.pem
 :ssl_cert: /var/lib/puppet/ssl/certs%= fqdn %.pem
 :ssl_key: /var/lib/puppet/ssl/private_keys/%= fqdn %.pem

 # 

[Puppet Users] Reports not showing up in foreman.

2015-03-04 Thread Peter Berghold
I'm going to re-ask this question because the issue is driving me crazy
even though I'm already close enough to walk.

Here's the setup:
 [Foreman Server with Puppet/PuppetDB]
 ^
  |
 V
  [ Subordinate (remote) Puppet Server ] (Proxy installed)
  ^
   |
   V
   [End client[

The Puppet master running on the Foreman host's job is to manage just the
remote masters.  The subordinate Puppet Masters are planned to be installed
in various data centers around the country.

The end client's puppet.conf looks like this (with the template variables
being replaced by their actual values):

### File managed with puppet ###
## Module:   'puppet'

[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

# Allow services in the 'puppet' group to access key (Foreman + proxy)
privatekeydir = $ssldir/private_keys { group = service }
hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

# Puppet 3.0.x requires this in both [main] and [master] - harmless on
agents
autosign   = $confdir/autosign.conf { mode = 664 }

show_diff = false

hiera_config = $confdir/hiera.yaml


   ca_server =%= foreman_host_fqdn%


### Next part of the file is managed by a different template ###
## Module:   'puppet'

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuration.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$statedir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig

# Disable the default schedules as they cause continual skipped
# resources to be displayed in Foreman - only for Puppet = 3.4
default_schedules = false

report= true
pluginsync= true
masterport= 8140
environment   = POC
certname  = %= fqdn %
server= %= puppethost_fqdn %
listen= false
splay = false
splaylimit= 1800
runinterval   = 1800
noop  = false
configtimeout = 600

Report is turned on and the remote Puppet Master is successfully managing
the client.

The [master] section of the remote Puppet Master's puppet.conf looks like
this:
[master]
storeconfigs = true
storeconfigs_backend = puppetdb
autosign   = $confdir/autosign.conf { mode = 664 }
reports= foreman
external_nodes = /etc/puppet/node.rb
node_terminus  = exec

ca = false


certname   = %= fqdn %
strict_variables = false

environmentpath  = /etc/puppet/environments
basemodulepath   =
/etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules

and I have a foreman.yaml file that looks like this:

---
# Update for your Foreman and Puppet master hostname(s)
:url: https://mtinjacn01.cip.att.com;
:ssl_ca: /var/lib/puppet/ssl/certs/ca.pem
:ssl_cert: /var/lib/puppet/ssl/certs%= fqdn %.pem
:ssl_key: /var/lib/puppet/ssl/private_keys/%= fqdn %.pem

# Advanced settings
:user: 
:password: 
:puppetdir: /var/lib/puppet
:puppetuser: puppet
:facts: true
:timeout: 10
:threads: null

Now the *facts* are showing up on the Foreman server for the remote client
but just not the reports.

First obvious question:  should they or am I chasing a ghost?

If they should be showing up what am I missing here?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv06Pb_cHRK1fjh7bOtfjyfrXBguvkEir69CuC6V3agzpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Provider throwing errors

2015-03-03 Thread Peter Berghold
I should have followed up, I found the problem using old fashioned moving
fence techniques.  Don't remember the actual code I found but I redid some
of the logic and it works now.

On Tue, Mar 3, 2015 at 6:58 AM Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 On 03/02/2015 05:18 PM, Peter Berghold wrote:
 
  I *believe* this is where I'm getting an error thrown such that:
  Error: /Stage[main]/Multibind::Mob_oam_svc/Bindconfigure[MOB_OAM_SVC]:
  Could not evaluate: wrong number of arguments (1 for 0)

 Oh you do? :-)

 Please run with --trace to confirm your suspicion.

 HTH,
 Felix

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/54F5A1B9.9060308%40alumni.tu-berlin.de.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1Hth45a3EOsiYqFRoCKjDn%2BZBhjRYP7V%2B1P3JYknemuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Provider throwing errors

2015-03-02 Thread Peter Berghold
Can someone look at this code?
 def get_bind_cfg_value(key)
   Puppet.warning(entered get_bind_cfg)
   if Facter.value('multibind_present')
   if Facter.value('multibind_configured')
 configuration=Facter.value('multibind_configuration')
 instance_cfg = configuration[resource(:name)]
 if instance_cfg
   return instance_cfg[key]
 else
   return :absent
 end # if instance_cfg
   else
 return :absent
   end # configured
 else
   return :absent
 end # if present
 end # def

I *believe* this is where I'm getting an error thrown such that:
Error: /Stage[main]/Multibind::Mob_oam_svc/Bindconfigure[MOB_OAM_SVC]:
Could not evaluate: wrong number of arguments (1 for 0)

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0gr1DEtui%2B_anw91%2BYjoBgmSHB9_Q%2BRzhJDvXySsn%2Bpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Quick question about types/providers

2015-03-02 Thread Peter Berghold
Turned out restarting the puppet master was the solution.  Drove me insane
for a while, but now all but a couple of things have started to work.  I've
posted about one of them in a separate thread.

On Sun, Mar 1, 2015 at 2:58 PM Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 Can you make your code available somewhere, so that we can reproduce?

 Generally, I'd like to second John's general advice: Do restart your
 Puppet processes to make sure that changes to your Ruby code take effect.

 Best,
 Felix

 On 02/27/2015 09:22 PM, Peter Berghold wrote:
  I think I discovered something, correct me if I'm in the weeds with
  this.
 
  Seems certain patterns cannot be used as parameters for a type.   So
  far on my list
 
  version
  ipv4listen
  rndcport
 
  that last one baffles me.
 
  bindconfigure { $mypersonality:
  #  ipv4listen=any,
ipv6listen=any,
# rndcport=951,
statsport=8080,
named='-n 2',
ztp=no,
m_notify=no,
transfer=none,
version='9.9.5-S1',
state=on,
notify= Service['named-all']
 
  }
   anybody see anything objectionable here?

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/54F36F6C.6070205%40Alumni.TU-Berlin.de.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv04GFXFMaG1APKffL8bs4DMFM76QsTttBVz%2Bs2i%3DXWqTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Quick question about types/providers

2015-02-27 Thread Peter Berghold
that's exactly what I was after.  Since this is my first type/provider pair
I'm proceeding cautiously.

On Fri, Feb 27, 2015 at 11:09 AM Felix Frank 
felix.fr...@alumni.tu-berlin.de wrote:

 On 02/27/2015 05:02 PM, Peter Berghold wrote:
  can I guess that the first def mod is what is referred to as a getter
  and second is a setter?Can I stretch that inference to say that if
  the value being passed to the setter is the same as what the getter is
  seeing it won't be set again?
 

 Yes, this is basically a getter/setter pair.

 However, the idempotency is implemented closer to the type layer. The
 transaction code will check whether properties are out of sync, and
 invoke the provider = methods to take action if necessary.

 On this higher level, your assertion should hold true. But I'm not sure
 if that's what you were asking.

 HTH,
 Felix

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Quick question about types/providers

2015-02-27 Thread Peter Berghold
Using the example of the file provider that is bundled with puppet here is
a sniglet of code that I've zoomed in on:

 def mode
if stat = resource.stat
  return (stat.mode  00).to_s(8)
else
  return :absent
end
  end

  def mode=(value)
begin
  File.chmod(value.to_i(8), resource[:path])
rescue = detail
  error = Puppet::Error.new(failed to set mode #{mode} on
#{resource[:path]}: #{detail.message})
  error.set_backtrace detail.backtrace
  raise error
end
  end

can I guess that the first def mod is what is referred to as a getter and
second is a setter?Can I stretch that inference to say that if the
value being passed to the setter is the same as what the getter is seeing
it won't be set again?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1VzxEgTLO8xv44GcPA0FKboQgEhVTLe%3DM2%2BY%2BMTO%2BAqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Quick question about types/providers

2015-02-27 Thread Peter Berghold
So, I wrote my type and its provider.

Have a bunch of params and of course the first one I try to use
  newparam(:ipv4listen) do
desc the ipv4listen param
  end

doesn't seem to be seen by the Puppet infrastructure.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Invalid parameter ipv4listen on Bindconfigure[MOB_OAM_SVC] at
/etc/puppet/environments/POC/modules/multibind/manifests/mob_oam_svc.pp:22
on node CLIENT
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

So obviously I'm missing something here...

Thoughts?   Wish there was an equivalent to Perl's Data::Dumper that would
let me see what parameters Puppet things are defined.


On Fri, Feb 27, 2015 at 12:25 PM Trevor Vaughan tvaug...@onyxpoint.com
wrote:

 Hi Peter,

 This might help:
 http://www.slideshare.net/PuppetLabs/puppet-type-and-provider-execution-presentation

 Thanks,

 Trevor

 On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com
 wrote:

 that's exactly what I was after.  Since this is my first type/provider
 pair I'm proceeding cautiously.

 On Fri, Feb 27, 2015 at 11:09 AM Felix Frank 
 felix.fr...@alumni.tu-berlin.de wrote:

 On 02/27/2015 05:02 PM, Peter Berghold wrote:
  can I guess that the first def mod is what is referred to as a getter
  and second is a setter?Can I stretch that inference to say that
 if
  the value being passed to the setter is the same as what the getter is
  seeing it won't be set again?
 

 Yes, this is basically a getter/setter pair.

 However, the idempotency is implemented closer to the type layer. The
 transaction code will check whether properties are out of sync, and
 invoke the provider = methods to take action if necessary.

 On this higher level, your assertion should hold true. But I'm not sure
 if that's what you were asking.

 HTH,
 Felix

 --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.

 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer
 .


 For more options, visit https://groups.google.com/d/optout.




 --
 Trevor Vaughan
 Vice President, Onyx Point, Inc
 (410) 541-6699
 tvaug...@onyxpoint.com

 -- This account not approved for unencrypted proprietary information --

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3hgXjYxbr0MeunP-M5dNnFZchKNT3fJ%2B8MYTOep5bqGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Quick question about types/providers

2015-02-27 Thread Peter Berghold
I think I discovered something, correct me if I'm in the weeds with this.

Seems certain patterns cannot be used as parameters for a type.   So far on
my list

version
ipv4listen
rndcport

that last one baffles me.

bindconfigure { $mypersonality:
#  ipv4listen=any,
  ipv6listen=any,
  # rndcport=951,
  statsport=8080,
  named='-n 2',
  ztp=no,
  m_notify=no,
  transfer=none,
  version='9.9.5-S1',
  state=on,
  notify= Service['named-all']

}
 anybody see anything objectionable here?


On Fri, Feb 27, 2015 at 2:21 PM Peter Berghold salty.cowd...@gmail.com
wrote:

 So, I wrote my type and its provider.

 Have a bunch of params and of course the first one I try to use
   newparam(:ipv4listen) do
 desc the ipv4listen param
   end

 doesn't seem to be seen by the Puppet infrastructure.

 Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
 Invalid parameter ipv4listen on Bindconfigure[MOB_OAM_SVC] at
 /etc/puppet/environments/POC/modules/multibind/manifests/mob_oam_svc.pp:22
 on node CLIENT
 Warning: Not using cache on failed catalog
 Error: Could not retrieve catalog; skipping run

 So obviously I'm missing something here...

 Thoughts?   Wish there was an equivalent to Perl's Data::Dumper that would
 let me see what parameters Puppet things are defined.


 On Fri, Feb 27, 2015 at 12:25 PM Trevor Vaughan tvaug...@onyxpoint.com
 wrote:

 Hi Peter,

 This might help: http://www.slideshare.net/PuppetLabs/puppet-type-and-
 provider-execution-presentation

 Thanks,

 Trevor

 On Fri, Feb 27, 2015 at 11:13 AM, Peter Berghold salty.cowd...@gmail.com
  wrote:

 that's exactly what I was after.  Since this is my first type/provider
 pair I'm proceeding cautiously.

 On Fri, Feb 27, 2015 at 11:09 AM Felix Frank 
 felix.fr...@alumni.tu-berlin.de wrote:

 On 02/27/2015 05:02 PM, Peter Berghold wrote:
  can I guess that the first def mod is what is referred to as a
 getter
  and second is a setter?Can I stretch that inference to say that
 if
  the value being passed to the setter is the same as what the getter is
  seeing it won't be set again?
 

 Yes, this is basically a getter/setter pair.

 However, the idempotency is implemented closer to the type layer. The
 transaction code will check whether properties are out of sync, and
 invoke the provider = methods to take action if necessary.

 On this higher level, your assertion should hold true. But I'm not sure
 if that's what you were asking.

 HTH,
 Felix

 --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/puppet-users/54F09689.7070607%40alumni.tu-berlin.de.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users+unsubscr...@googlegroups.com.

 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg
 %40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAArvnv0FwW2wFqye_VU_LRX4yyFD4yu0O6VVVDQOQ0Q9Yxi3Tg%40mail.gmail.com?utm_medium=emailutm_source=footer
 .


 For more options, visit https://groups.google.com/d/optout.




 --
 Trevor Vaughan
 Vice President, Onyx Point, Inc
 (410) 541-6699
 tvaug...@onyxpoint.com

 -- This account not approved for unencrypted proprietary information --

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%
 3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CANs%2BFoVpm1s64ZuXsEHOd-uH3PRv%3DTK9U77URwK%2BT%2BhpvUX43Q%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0zZ0DLgoLO6-6PfXuxays2TQrft2xHbMatwP80K1TFeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: first custom type... in the weeds already

2015-02-26 Thread Peter Berghold
Puppet::Type.newtype(:bannerfile) do
  newparam(:name)do
  end
  newparam(:bannertext)do
  end

  newparam(:bannertext2)do
  end

end

but a name variable is being defined and I'm still seeing the issue.


On Thu, Feb 26, 2015 at 10:02 AM jcbollinger john.bollin...@stjude.org
wrote:



 On Wednesday, February 25, 2015 at 3:25:57 PM UTC-6, Salty Old Cowdawg
 wrote:

 I've created a very simple type as follows:

 Puppet::Type.newtype(:bannerfile) do
   @doc = Create a text file with banner text
   ensurable
   newproperty(:name)do
 isnamevar
   end
   newproperty(:bannertext)do
   end
   newproperty(:bannertext2)do
   end


 end
 doesn't do anything yet, but it is a start.

 I'm invoking it from a class thusly:

  bannerfile { /tmp/bannerfile:
   bannertext = This would be banner text,
   bannertext2 = $testmodule::config::line2

 }

 and when I run the Puppet agent I get:

 Error: Could not retrieve catalog from remote server: Error 400 on
 SERVER: No set of title patterns matched the title /tmp/bannerfile

 what on earth is it trying to tell me?



 It's telling you that the way your type's namevar is set up is wrong.  At
 a guess, Puppet thinks you have a composite namevar.  The custom type
 documentation https://docs.puppetlabs.com/guides/custom_types.html has
 this to say about namevars:

 There are three ways to designate a namevar. Every type must have *exactly
 one* parameter that meets *exactly one* of these criteria:

 *Option 1:* Create a parameter whose name is :name. Since most types
 just use :name as the namevar, it gets special treatment and will
 automatically become the namevar.
 [...]
 *Option 2:* Provide the :namevar = true option as an additional
 argument to the newparam call.
 [...]
 *Option 3:* Call the isnamevar method (which takes no arguments) inside
 the parameter’s code block.


 (emphasis in the original).  Your 'name' parameter meets *two* of those
 criteria, so I'd try omitting the 'isnamevar' from its code block to trim
 that back to one.


 John

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/0fc9f8dd-e584-4483-82aa-6d17c049bafc%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/0fc9f8dd-e584-4483-82aa-6d17c049bafc%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1gaYtUHMGuRBQ5WzC78QZ6M7H9Z7%3DrHpHsSXwxuzobbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] forcing a variable to be lower case?

2015-02-25 Thread Peter Berghold
I have a situation where there is an uppercase letter in a client's host
name. When Puppet creates the certificate for the host the resultant name
for the is in all lower case as I'd expect.

The trouble comes in where I am managing the /etc/puppet/puppet.conf file.
In my template I have
certname = %= certname %

and in my class I have certname defined as

 $certname = downcase($fqdn)

This is not working.  How should I attack this?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1oQGU24LHrMW0FFQERZtY4AAgWzEJSakQndh2S4Sbh7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] forcing a variable to be lower case?

2015-02-25 Thread Peter Berghold
Thank you!  That got it.  Why it didn't work before I'm not sure. On to
my next dumb question.


On Wed, Feb 25, 2015 at 3:21 PM Peter Bukowinski pmb...@gmail.com wrote:


  On Feb 25, 2015, at 3:20 PM, Peter Bukowinski pmb...@gmail.com wrote:
 
 
  On Feb 25, 2015, at 2:26 PM, Peter Berghold salty.cowd...@gmail.com
 wrote:
 
  I have a situation where there is an uppercase letter in a client's
 host name. When Puppet creates the certificate for the host the resultant
 name for the is in all lower case as I'd expect.
 
  The trouble comes in where I am managing the /etc/puppet/puppet.conf
 file. In my template I have
 certname = %= certname %
 
  and in my class I have certname defined as
 
  $certname = downcase($fqdn)
 
  This is not working.  How should I attack this?
 
  Since templates let you use normal ruby functions, I would do your
 downcasing in there:
 
certname = % certname.downcase %
 
 Correction:

 certname = %= certname.downcase %

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/DB8C41A8-AA82-4769-83C5-7B0D19AC7CBE%40gmail.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2Seszfx-p%3D79ZzFJwVk9vVW9v9gE7VVsgkQdNJaD-6Lw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] first custom type... in the weeds already

2015-02-25 Thread Peter Berghold
I've created a very simple type as follows:

Puppet::Type.newtype(:bannerfile) do
  @doc = Create a text file with banner text
  ensurable
  newproperty(:name)do
isnamevar
  end
  newproperty(:bannertext)do
  end
  newproperty(:bannertext2)do
  end


end
doesn't do anything yet, but it is a start.

I'm invoking it from a class thusly:

 bannerfile { /tmp/bannerfile:
  bannertext = This would be banner text,
  bannertext2 = $testmodule::config::line2

}

and when I run the Puppet agent I get:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
No set of title patterns matched the title /tmp/bannerfile

what on earth is it trying to tell me?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv3FN_%2B%3DuQF9f%2BTgSUwXbti-OwFdqDvcOyi2Yi%3D%2BBixU0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] multiple Puppet masters with Foreman -- 'sproke

2015-02-24 Thread Peter Berghold
What it looks like to me is going on is the YML file for the host ends up
on the Remote Master (which I can verify by looking for it) and the node.rb
is running on the Grand Master. Since the YML files isn't on the Grand
Master the lookup (of course) fails.   So the real question is can we make
the YML file go to the Grand Master.

To that end I played with a couple of settings

Here is a partial dump of what I have in the puppet.conf file for the
Remote Master:

[master]
storeconfigs = true
storeconfigs_backend = puppetdb
inventory_server =Grand Master FQDN
autosign   = $confdir/autosign.conf { mode = 664 }
reports= foreman
external_nodes = /etc/puppet/node.rb
node_terminus  = exec

I found a reference to an inventory server in the Puppet docs but that
seems to have had no effect on the problem.  What I'm wondering about is
the external_node and node_terminus settings.  Are those correct for
what I'm trying to do or should that be something else?


On Tue Feb 24 2015 at 9:04:45 AM David Schmitt da...@dasz.at wrote:

 Hi Peter,

 you might be running into http://projects.theforeman.org/issues/5925 .

 I'm wondering whether subsequent runs work.

 Also, the node.rb will run on the remote client's puppet master, so,
 probably your Remote Master. Since the default node.rb from foreman
 requires this yaml file, it'll not work on your Grand Master unless
 the agent has tried to contact that one too.


 Regards, David

 On 2015-02-24 14:45, Peter Berghold wrote:
  Using crude ascii art, here is what I have set up so far in my lab..
 
 [Foreman/Puppet Grand Master]  -- foreman-proxy
 here
  ^
   |
  V
   [Puppet Remote Master]  -- foreman-proxy
  running here.
^
 |
 V
[Simulated Remote Client]
 
  The Foreman/Puppet Grand Master seem to be working swimmingly so far.
  The Remote Master is getting its directions from the Grand Master.  So
  far so good.
 
  Add the client and things start getting sideways.  When I run the Puppet
  agent on the remote client I get an error such that:
 
  Error: Could not retrieve catalog from remote server: Error 400 on
  SERVER: Failed when searching for node FQDN: Failed to find FQDN  via
  exec: Execution of '/etc/puppet/node.rb FQDN' returned 1:
  Warning: Not using cache on failed catalog
  Error: Could not retrieve catalog; skipping run
 
  I went over to the Grand Master and ran the /etc/puppet/node.rb from the
  command line and it complains that it cannot find the yaml file in its
  proper place.  OK so I went over to the remote master and sure enough it
  was there.
 
  Needless to say Foreman has no idea the host is there.
 
  What's the right electric acid Kool Aid foo to make this work
  correctly?  It would seem the YAML file needs to be on the Grand Master
  and not the remote master... or does it?  Is there a way the
  foreman-proxy can help here?



 
  --
 
  Peter L. Berghold salty.cowd...@gmail.com mailto:Salty.Cowdawg@gmail.
 com
 
  h http://blog.berghold.netttp://science-fiction.berghold.net
  http://science-fiction.berghold.net
 
  --
  You received this message because you are subscribed to the Google
  Groups Puppet Users group.
  To unsubscribe from this group and stop receiving emails from it, send
  an email to puppet-users+unsubscr...@googlegroups.com
  mailto:puppet-users+unsubscr...@googlegroups.com.
  To view this discussion on the web visit
  https://groups.google.com/d/msgid/puppet-users/CAArvnv2Hnia87teGgq8Wt%
 3DpzSJOvUTgesHH1F7mkvFy1WTsGFA%40mail.gmail.com
  https://groups.google.com/d/msgid/puppet-users/CAArvnv2Hnia87teGgq8Wt%
 3DpzSJOvUTgesHH1F7mkvFy1WTsGFA%40mail.gmail.com?utm_medium=
 emailutm_source=footer.
  For more options, visit https://groups.google.com/d/optout.


 --
 * Always looking for people I can help with awesome projects *
 Twitter: @dev_el_ops G+: https://plus.google.com/+DavidSchmitt
 Blog: http://club.black.co.at/log/
 LinkedIn: http://at.linkedin.com/in/davidschmitt

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/54EC84DD.8090400%40dasz.at.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https

[Puppet Users] multiple Puppet masters with Foreman -- 'sproke

2015-02-24 Thread Peter Berghold
Using crude ascii art, here is what I have set up so far in my lab..

  [Foreman/Puppet Grand Master]  -- foreman-proxy here
   ^
|
   V
[Puppet Remote Master]  -- foreman-proxy running
here.
 ^
  |
  V
 [Simulated Remote Client]

The Foreman/Puppet Grand Master seem to be working swimmingly so far. The
Remote Master is getting its directions from the Grand Master.  So far so
good.

Add the client and things start getting sideways.  When I run the Puppet
agent on the remote client I get an error such that:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed when searching for node FQDN: Failed to find FQDN  via exec:
Execution of '/etc/puppet/node.rb FQDN' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I went over to the Grand Master and ran the /etc/puppet/node.rb from the
command line and it complains that it cannot find the yaml file in its
proper place.  OK so I went over to the remote master and sure enough it
was there.

Needless to say Foreman has no idea the host is there.

What's the right electric acid Kool Aid foo to make this work correctly?
It would seem the YAML file needs to be on the Grand Master and not the
remote master... or does it?  Is there a way the foreman-proxy can help
here?

-- 

Peter L. Berghold   salty.cowd...@gmail.com

h http://blog.berghold.netttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv2Hnia87teGgq8Wt%3DpzSJOvUTgesHH1F7mkvFy1WTsGFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] multiple Puppet masters with Foreman -- 'sproke

2015-02-24 Thread Peter Berghold
FOUND IT!

It was a comedy of errors.  The perms on the node.rb script were wrong (not
sure how they got that way, but...) and not only that there was some
residual configuration issues from an experiment I did two weeks ago that
was pointing to the hostname pocforman.domain instead of the FQDN of the
Foreman host which caused a mismatch on the cert names.

Once I got those two things corrected (found out through running the remote
server in debug mode) it all started to work correctly.

on to the next thing... I'm working towards a demo of the
infrastructure second week in March.   Will be the go/no go for putting
this in production.



On Tue Feb 24 2015 at 10:41:57 AM David Schmitt da...@dasz.at wrote:

 On 2015-02-24 16:09, Peter Berghold wrote:
  What it looks like to me is going on is the YML file for the host ends
  up on the Remote Master (which I can verify by looking for it) and the
  node.rb is running on the Grand Master. Since the YML files isn't on the
  Grand Master the lookup (of course) fails.   So the real question is can
  we make the YML file go to the Grand Master.
 
  To that end I played with a couple of settings
 
  Here is a partial dump of what I have in the puppet.conf file for the
  Remote Master:
 
  [master]
   storeconfigs = true
   storeconfigs_backend = puppetdb
   inventory_server =Grand Master FQDN
   autosign   = $confdir/autosign.conf { mode = 664 }
   reports= foreman
   external_nodes = /etc/puppet/node.rb
   node_terminus  = exec
 
  I found a reference to an inventory server in the Puppet docs but that
  seems to have had no effect on the problem.  What I'm wondering about is
  the external_node and node_terminus settings.  Are those correct for
  what I'm trying to do or should that be something else?

 Those are correct and will cause this process to locally (on the master)
 execute the node.rb to receive ENC information.

 Please re-test whether running node.rb on the master having the right
 YML file still fails.


 Regards, David


  On Tue Feb 24 2015 at 9:04:45 AM David Schmitt da...@dasz.at
  mailto:da...@dasz.at wrote:
 
  Hi Peter,
 
  you might be running into
  http://projects.theforeman.__org/issues/5925
  http://projects.theforeman.org/issues/5925 .
 
  I'm wondering whether subsequent runs work.
 
  Also, the node.rb will run on the remote client's puppet master, so,
  probably your Remote Master. Since the default node.rb from foreman
  requires this yaml file, it'll not work on your Grand Master unless
  the agent has tried to contact that one too.
 
 
  Regards, David
 
  On 2015-02-24 14:45, Peter Berghold wrote:
Using crude ascii art, here is what I have set up so far in my
 lab..
   
   [Foreman/Puppet Grand Master]  --
  foreman-proxy here
^
 |
V
 [Puppet Remote Master]  -- foreman-proxy
running here.
  ^
   |
   V
  [Simulated Remote Client]
   
The Foreman/Puppet Grand Master seem to be working swimmingly so
 far.
The Remote Master is getting its directions from the Grand
  Master.  So
far so good.
   
Add the client and things start getting sideways.  When I run the
  Puppet
agent on the remote client I get an error such that:
   
Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: Failed when searching for node FQDN: Failed to find FQDN
 via
exec: Execution of '/etc/puppet/node.rb FQDN' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
   
I went over to the Grand Master and ran the /etc/puppet/node.rb
  from the
command line and it complains that it cannot find the yaml file
  in its
proper place.  OK so I went over to the remote master and sure
  enough it
was there.
   
Needless to say Foreman has no idea the host is there.
   
What's the right electric acid Kool Aid foo to make this work
correctly?  It would seem the YAML file needs to be on the Grand
  Master
and not the remote master... or does it?  Is there a way the
foreman-proxy can help here?
 
 
 
   
--
   
Peter L. Berghold salty.cowd...@gmail.com
  mailto:salty.cowd...@gmail.com mailto:Salty.Cowdawg@gmail.__com
  mailto:salty.cowd...@gmail.com
   
h http://blog.berghold.netttp:__//science-fiction.berghold.net
  http://science-fiction.berghold.net
http

[Puppet Users] asking a question a different way

2015-02-19 Thread Peter Berghold
is it possible for one puppet master to be managed by another?  Ascii art
to illustrate what I mean:
   Puppet Grand Master
/   |   \
Master1 master2master3

 clients:1 clients:2clients:3


My goal is to have a Puppet Master in each data center local to the hosts
it manages reporting up to a central Foreman server via foreman-proxy



-- 

Peter L. Berghold   salty.cowd...@gmail.com

h http://blog.berghold.netttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv0CnZ4XPd%2B9cv1H9TS%2B4UVbsyNAXtZi1oyEHmSBMeoqkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: asking a question a different way

2015-02-19 Thread Peter Berghold
On Thu, Feb 19, 2015 at 11:49 AM, David Bryant-Moore 
david.bmo...@puppetlabs.com wrote:



 Typically, the MoM will host the CA function for the second tier Masters,
 but this isn't an explicit constraint of the model


 This was the piece I was missing and another answer I got said the same
thing.  Later on today I'm giving this a shot.  Once I get the POC done and
demoed to the bosses I'm going to tackle alt_dns_names setups which blew up
spectacularly for me.


-- 

Peter L. Berghold   salty.cowd...@gmail.com

h http://blog.berghold.netttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1rcp4xxf7g-auODpr4WQ3O7-TU9CYqXWu%3DQNLNBQbPjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Weird puppetmaster issue.

2015-02-18 Thread Peter Berghold
I've been banging my head against the wall with this one.  Probably a
simple fix but I'm not seeing it at the moment.

I have a proof of concept setup in our lab where I have a central
Foreman/Puppet server.  The Puppet server on the Foreman box has the
responsibility of keeping things straight on subordinate remote servers
that in production will be located in the same data center as the client
base they will server.

To get the POC remote server set up I manually load the Puppet client
software on the host (later it will come pre-loaded on a VM template) and I
run the Puppet client manually.  That first run is all about the certs and
getting the Foreman ENC aware of the host.  Adding a couple of config
groups the the host and next we run puppet agent -t-test --server=foreman
host fqdn and all the configuration files get loaded and then things go
sideways.

The Puppet Master daemon will not run on the host.  What I'm seeing in
/var/log/messages is as follows:

Feb 18 19:48:20 hostname puppet-master[32593]: Could not prepare for
execution: The certificate retrieved from the master does not match the
agent's private key.
Feb 18 19:48:20 hostnamepuppet-master[32593]: Certificate
fingerprint: 
BC:0C:19:83:62:F8:A6:AD:ED:85:B7:19:B6:AD:75:FE:36:62:D7:43:C9:5B:76:64:E8:A1:F5:C1:FE:1F:39:21
Feb 18 19:48:20 hostnamepuppet-master[32593]: To fix this, remove the
certificate from both the master and the agent and then start a puppet run,
which will automatically regenerate a certficate.
Feb 18 19:48:20 hostname puppet-master[32593]: On the master:
Feb 18 19:48:20 hostname puppet-master[32593]:   puppet cert clean agent
host FQDN
Feb 18 19:48:20 hostname puppet-master[32593]: On the agent:
Feb 18 19:48:20 hostname puppet-master[32593]:   1a. On most platforms:
find /var/lib/puppet/ssl -name agent host FQDN -delete
Feb 18 19:48:20 hostnamepuppet-master[32593]:   1b. On Windows:
del /var/lib/puppet/ssl/agent host FQDN.pem /f
Feb 18 19:48:20 hostname puppet-master[32593]:   2. puppet agent -t

Here is my puppet.conf (sanitized) from my clent system

[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

# Allow services in the 'puppet' group to access key (Foreman + proxy)
privatekeydir = $ssldir/private_keys { group = service }
hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

# Puppet 3.0.x requires this in both [main] and [master] - harmless on
agents
autosign   = $confdir/autosign.conf { mode = 664 }

show_diff = false

hiera_config = $confdir/hiera.yaml

### Next part of the file is managed by a different template ###
## Module:   'puppet'

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuration.  Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$statedir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration.  An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig

# Disable the default schedules as they cause continual skipped
# resources to be displayed in Foreman - only for Puppet = 3.4
default_schedules = false

report= true
pluginsync= true
masterport= 8140
environment   = production
certname  = agent host fqdn
server= puppet host fqdn
listen= false
splay = false
splaylimit= 1800
runinterval   = 1800
noop  = false
configtimeout = 600

[master]
storeconfigs = true
storeconfigs_backend = puppetdb
autosign   = $confdir/autosign.conf { mode = 664 }
reports= foreman
external_nodes = /etc/puppet/node.rb
node_terminus  = exec
ca = true
ssldir = /var/lib/puppet/ssl
certname   = agent host FQDN
strict_variables = false

environmentpath  = /etc/puppet/environments
basemodulepath   =
/etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules


Just to be clear:  puppet host FQDN is the central Foreman/Puppet
Master's FQDN not the agent FQDN that where a remote Puppet master is
trying to start.

Thoughts?  Am I going about this wrong?

-- 

Peter L. Berghold   salty.cowd...@gmail.com

h http://blog.berghold.netttp://science-fiction.berghold.net

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 

  1   2   3   >