Re: [Puppet Users] Announce: Puppet Agent 1.8.0 is available

2016-11-01 Thread Geoff Nichols


On Tuesday, November 1, 2016 at 6:49:20 PM UTC-7, Garrett Honeycutt wrote:
>
> On 11/1/16 9:29 PM, Geoff Nichols wrote: 
> > I’m excited to announce a new backwards-compatible feature release of 
> > Puppet Agent. Puppet Agent 1.8.0 contains several updated component 
> > versions, including new feature releases of Puppet and Facter. 
> > 
> > 
> > * Puppet 4.8.0 - This release includes several improvements to the type 
> > system and updates puppet module tool to use "forgeapi.puppet.com 
> > " (instead of "forgeapi.puppetlabs.com 
> > "). 
> > 
> > 
> > * Facter 3.5.0 - New feature release allowing settings for configuring 
> > external and custom fact directories, setting command line options, and 
> > blocking facts - loaded by default from 
> /etc/puppetlabs/facter/facter.conf. 
> > 
> > 
> > This release also adds support for macOS Sierra and Windows Server 2016. 
> > 
> > 
> > Release notes for each of these are linked from the main puppet-agent 
> > note: 
> https://docs.puppet.com/puppet/4.8/reference/release_notes_agent.html 
> > 
> > 
> > For information on upcoming platform end-of-life (EOL) for Puppet Agent, 
> > please see our Platform Support Lifecycle page: 
> > https://puppet.com/content/platform-support-lifecycle 
> > 
> > 
> > Community shout-out to Clay Caviness for several contributions to this 
> > release - including a fix for ‘tidy’ and additional fixes for Mac OS X. 
> > 
> > 
> > 
> > -- 
> > 
> > Geoff Nichols 
> > Puppet Ecosystem - Agent and Platform Team 
>
> Hi Geoff, 
>
> I added puppet 4.8.0 to a test harness and it seems that it has not been 
> released to rubygems.org, which is needed for automated testing. 
>
> Could you please release it to rubygems.org. 
>
> Thanks, 
> -g 
>
> -- 
> Garrett Honeycutt 
> @learnpuppet 
> Puppet Training with LearnPuppet.com 
> Mobile: +1.206.414.8658 
>

Hi Garrett,

Puppet 4.8.0 gems are now available at rubygems.org.

Thanks,
Geoff

-- 
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/bb70c613-362a-4b65-8ebe-fbd51bb66939%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Announce: Puppet Agent 1.8.0 is available

2016-11-01 Thread Garrett Honeycutt
On 11/1/16 9:29 PM, Geoff Nichols wrote:
> I’m excited to announce a new backwards-compatible feature release of
> Puppet Agent. Puppet Agent 1.8.0 contains several updated component
> versions, including new feature releases of Puppet and Facter.
> 
> 
> * Puppet 4.8.0 - This release includes several improvements to the type
> system and updates puppet module tool to use "forgeapi.puppet.com
> " (instead of "forgeapi.puppetlabs.com
> ").
> 
> 
> * Facter 3.5.0 - New feature release allowing settings for configuring
> external and custom fact directories, setting command line options, and
> blocking facts - loaded by default from /etc/puppetlabs/facter/facter.conf.
> 
> 
> This release also adds support for macOS Sierra and Windows Server 2016.
> 
> 
> Release notes for each of these are linked from the main puppet-agent
> note: https://docs.puppet.com/puppet/4.8/reference/release_notes_agent.html
> 
> 
> For information on upcoming platform end-of-life (EOL) for Puppet Agent,
> please see our Platform Support Lifecycle page:
> https://puppet.com/content/platform-support-lifecycle
> 
> 
> Community shout-out to Clay Caviness for several contributions to this
> release - including a fix for ‘tidy’ and additional fixes for Mac OS X.
> 
> 
> 
> -- 
> 
> Geoff Nichols
> Puppet Ecosystem - Agent and Platform Team

Hi Geoff,

I added puppet 4.8.0 to a test harness and it seems that it has not been
released to rubygems.org, which is needed for automated testing.

Could you please release it to rubygems.org.

Thanks,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/b21cd7e8-0f8d-1bd4-c711-e15f4b46eb64%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Puppet Agent 1.8.0 is available

2016-11-01 Thread Geoff Nichols
I’m excited to announce a new backwards-compatible feature release of
Puppet Agent. Puppet Agent 1.8.0 contains several updated component
versions, including new feature releases of Puppet and Facter.

* Puppet 4.8.0 - This release includes several improvements to the type
system and updates puppet module tool to use "forgeapi.puppet.com" (instead
of "forgeapi.puppetlabs.com").

* Facter 3.5.0 - New feature release allowing settings for configuring
external and custom fact directories, setting command line options, and
blocking facts - loaded by default from /etc/puppetlabs/facter/facter.conf.

This release also adds support for macOS Sierra and Windows Server 2016.

Release notes for each of these are linked from the main puppet-agent note:
https://docs.puppet.com/puppet/4.8/reference/release_notes_agent.html

For information on upcoming platform end-of-life (EOL) for Puppet Agent,
please see our Platform Support Lifecycle page:
https://puppet.com/content/platform-support-lifecycle

Community shout-out to Clay Caviness for several contributions to this
release - including a fix for ‘tidy’ and additional fixes for Mac OS X.


-- 
Geoff Nichols
Puppet Ecosystem - Agent and Platform Team

-- 
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/CADjnYByDRH6eC62T5_%2BZ-1MMO85r-TdgAEOZRfvG-WrwAo%3DfsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Contain

2016-11-01 Thread Chuck
This is a really good video that explains it. 

http://youtu.be/jvDLXykcxiA

-- 
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/71e5c9cc-22f5-44d1-8ff3-38b1454052c1%40googlegroups.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 
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 
> 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 
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.


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

2016-11-01 Thread Andrew Grimberg
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.


signature.asc
Description: OpenPGP digital signature


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

2016-11-01 Thread Garrett Honeycutt
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.

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/cbe019bf-e5bc-c19c-177a-9d2e5492a080%40garretthoneycutt.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] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-01 Thread Garrett Honeycutt
On 11/1/16 6:12 AM, David Schmitt wrote:
> Hi Steve,
> 
> I can reproduce this locally, and it looks like some kind of setup issue
> around how (rspec-)puppet is loading lookup data.
> 
> I'll look into it, and keep you posted.
> 
> Regards, David
> 
> On Monday, October 31, 2016 at 2:39:54 AM UTC, Stephen Nesbitt wrote:
> 
> All:
> 
> I'm struggling to unit test a very simple profile with a dependency
> on the ntp 5.0.0 module - the ntp version implementing module data.
> The problem is that none of the default values for ntp are
> visible/available to the unit test as indicated by the failure:
> |
>   1) profile::ntp::client with default values for all parameters
> profile::ntp::client should compile into a catalogue without
> dependency cycles
>  Failure/Error: it { is_expected.to 
> compile.with_all_deps }
>  
>   error during compilation:EvaluationError:Errorwhileevaluating
> a FunctionCall,Class[Ntp]:
>  expects a value forparameter 'autoupdate'
>  expects a value forparameter 'broadcastclient'
>  expects a value forparameter 'config'
>  ...
> |
> 
> 
> The profile::ntp::client class is very simple:
> 
> |
> classprofile::ntp::client {
>  include ::ntp
> }
> |
> 
> My spec helper is:
> 
> |
> require'puppetlabs_spec_helper/module_spec_helper'
> 
> RSpec.configure do|c|
>  c.after(:suite)do
>  RSpec::Puppet::Coverage.report!(95)
>  end
> end
> |
> 
> My .fixtures.yml
> 
> |
> 
> fixtures:
>  forge_modules:
>  ntp:'puppetlabs/ntp'
>  stdlib:'puppetlabs/stdlib'
>  symlinks:
>  profile:"#{source_dir}/../profile"
> |
> 
> 
> My unit test:
> 
> |
> 
> require 'spec_helper'
> 
> describe 'profile::ntp::client' do
> context 'with default values for all parameters' do
> describe 'profile::ntp::client' do
> it { is_expected.to  compile.with_all_deps }
>   # it { is_expected.to 
> contain_class('profile::ntp::client') }
> # it { is_expected.to  contain_class('::ntp') }
> 
> end
> end
> end
> 
> |
> 
> Puppet version is 4.7.0. Host OS is ubuntu 16.04
> 
> 
> Any help in resolving this would be much appreciated.
> 
> 
> -steve
> 

Hi,

I noticed that your .fixtures.yml do not include versions. This means
that they will always test against the latest version. You probably want
to change this to use the version you actually use.

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/adc79629-9318-87d5-0194-d4a8f2f027bb%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-01 Thread Stephen Nesbitt
Thanks David! I really appreciate 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/0591c85d-21a5-480e-9a74-5548e41035eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-01 Thread David Schmitt
Hi again,

The issue you are seeing is connected to the test not having facts 
available to properly populate the hierarchy used by data-in-modules in the 
NTP module.

I've added

  let :facts do
{
  os: {
name: 'Debian',
family: 'Debian',
release: { major: 'stretch/sid', full: 'stretch/sid' }
  }
}
  end

to the outer-most describe, and with that the test passed. Before you say 
it, yes the error messaging around this is atrocious and needs improvement. 
I've created https://tickets.puppetlabs.com/browse/PUP-6856 to track this.


Thanks for reporting this!
David


On Tuesday, November 1, 2016 at 10:12:21 AM UTC, David Schmitt wrote:
>
> Hi Steve,
>
> I can reproduce this locally, and it looks like some kind of setup issue 
> around how (rspec-)puppet is loading lookup data.
>
> I'll look into it, and keep you posted.
>
> Regards, David
>
> On Monday, October 31, 2016 at 2:39:54 AM UTC, Stephen Nesbitt wrote:
>>
>> All:
>>
>> I'm struggling to unit test a very simple profile with a dependency on 
>> the ntp 5.0.0 module - the ntp version implementing module data. The 
>> problem is that none of the default values for ntp are visible/available to 
>> the unit test as indicated by the failure:
>>   1) profile::ntp::client with default values for all parameters 
>> profile::ntp::client should compile into a catalogue without dependency 
>> cycles
>>  Failure/Error: it { is_expected.to compile.with_all_deps }
>>  
>>   error during compilation: Evaluation Error: Error while evaluating 
>> a Function Call, Class[Ntp]:
>>  expects a value for parameter 'autoupdate'
>>  expects a value for parameter 'broadcastclient'
>>  expects a value for parameter 'config'
>>  ...
>>
>>
>> The profile::ntp::client class is very simple:
>>
>> class profile::ntp::client {
>>  include ::ntp
>> }
>>
>> My spec helper is:
>>
>> require 'puppetlabs_spec_helper/module_spec_helper'
>>
>> RSpec.configure do |c|
>>  c.after(:suite) do
>>  RSpec::Puppet::Coverage.report!(95)
>>  end
>> end
>>
>> My .fixtures.yml
>>
>>
>> fixtures:
>>  forge_modules:
>>  ntp: 'puppetlabs/ntp'
>>  stdlib: 'puppetlabs/stdlib'
>>  symlinks:
>>  profile: "#{source_dir}/../profile"
>>
>>
>> My unit test:
>>
>> require 'spec_helper'
>>
>> describe 'profile::ntp::client' do
>>   context 'with default values for all parameters' do
>> describe 'profile::ntp::client' do
>>   it { is_expected.to compile.with_all_deps }
>>   # it { is_expected.to contain_class('profile::ntp::client') }
>>   # it { is_expected.to contain_class('::ntp') }
>>
>>   end
>>   end
>> end
>>
>>
>> Puppet version is 4.7.0. Host OS is ubuntu 16.04
>>
>>
>> Any help in resolving this would be much appreciated.
>>
>>
>> -steve
>>
>>

-- 
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/a708176a-e8e2-45c3-90ae-7e3148ffa1ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Help unit testing profile with dependency on ntp 5.0 module (module data)

2016-11-01 Thread David Schmitt
Hi Steve,

I can reproduce this locally, and it looks like some kind of setup issue 
around how (rspec-)puppet is loading lookup data.

I'll look into it, and keep you posted.

Regards, David

On Monday, October 31, 2016 at 2:39:54 AM UTC, Stephen Nesbitt wrote:
>
> All:
>
> I'm struggling to unit test a very simple profile with a dependency on the 
> ntp 5.0.0 module - the ntp version implementing module data. The problem is 
> that none of the default values for ntp are visible/available to the unit 
> test as indicated by the failure:
>   1) profile::ntp::client with default values for all parameters 
> profile::ntp::client should compile into a catalogue without dependency 
> cycles
>  Failure/Error: it { is_expected.to compile.with_all_deps }
>  
>   error during compilation: Evaluation Error: Error while evaluating 
> a Function Call, Class[Ntp]:
>  expects a value for parameter 'autoupdate'
>  expects a value for parameter 'broadcastclient'
>  expects a value for parameter 'config'
>  ...
>
>
> The profile::ntp::client class is very simple:
>
> class profile::ntp::client {
>  include ::ntp
> }
>
> My spec helper is:
>
> require 'puppetlabs_spec_helper/module_spec_helper'
>
> RSpec.configure do |c|
>  c.after(:suite) do
>  RSpec::Puppet::Coverage.report!(95)
>  end
> end
>
> My .fixtures.yml
>
>
> fixtures:
>  forge_modules:
>  ntp: 'puppetlabs/ntp'
>  stdlib: 'puppetlabs/stdlib'
>  symlinks:
>  profile: "#{source_dir}/../profile"
>
>
> My unit test:
>
> require 'spec_helper'
>
> describe 'profile::ntp::client' do
>   context 'with default values for all parameters' do
> describe 'profile::ntp::client' do
>   it { is_expected.to compile.with_all_deps }
>   # it { is_expected.to contain_class('profile::ntp::client') }
>   # it { is_expected.to contain_class('::ntp') }
>
>   end
>   end
> end
>
>
> Puppet version is 4.7.0. Host OS is ubuntu 16.04
>
>
> Any help in resolving this would be much appreciated.
>
>
> -steve
>
>

-- 
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/7188ddc7-c652-43b7-800a-1b5ee4f32376%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Contain

2016-11-01 Thread Martin Alfke
Hi Gareth,
> On 31 Oct 2016, at 17:10, Anfield  wrote:
> 
> Can anyone explain what puppet contain function does for classes? Cant seem 
> to grasp this concept.

contain adds a class to the catalog (similar to what include does).
But contain handles the way where the class gets added.

Think about the following code:

class a {
  include c
}
class b {
  include c
}

node default {
  include a
  include b
  Class[‘a’] -> Class[‘b’]
}

When does class c gets added to the catalog?
Class a and b are put into order. But class c is not added at a specific place 
in the catalog.

This is where contain comes into place:

class a {
  contain c
}
class b {
 include c
}

node default {
  include a
  include b
  Class[‘a’] -> Class[‘b’]
}

In this case the contain function ensures that the class c is added within 
class a.

hth,
Martin

-- 
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/75641F96-60B8-450A-B6FD-DA7FE42775CD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.