Re: [Puppet Users] ENC - how to set order of operations?

2014-02-04 Thread Jason Antman
Disregard some of what I said. Sorry for the confusion. Stages can only 
be used on classes not individual resources, so that won't work as 
cleanly with forge modules (or anything that isn't specifically setup to 
use stages).


On 02/04/2014 07:43 AM, Jason Antman wrote:

Jon,

I've been using ENCs for quite a while, and have never used them with 
site manifests (or any other manifests outside of modules). At the 
moment, when I do things like that, I either do them inside a class 
(i.e. put what you have in a wrapper class), or use "require" on all 
resource instances.


My plan in the near future, which AFAIK is at least close to best 
practice and is (at least in my opinion) the most elegant and "right" 
way to do this, the is to use run stages to handle all Package 
resources in a "setup" stage, and then add a stage before that that 
handles repository setup. Though this will probably also require a 
site.pp to setup the stage for all Package resources.


For more information on run stages, see:
- http://docs.puppetlabs.com/puppet/3/reference/lang_run_stages.html
- the default stages setup by puppetlabs-stdlib - 
https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/manifests/stages.pp


-Jason

On 02/03/2014 01:51 PM, Jon Yeargers wrote:
So if a given node is named in both an ENC and the site manifest... 
it will use both? IE If I have some definitions that I want to send 
everywhere and others that are node specific.. I can use both types 
of node entries?


On Monday, February 3, 2014 10:14:52 AM UTC-8, Dan Bode wrote:




On Mon, Feb 3, 2014 at 9:45 AM, Jon Yeargers > wrote:

Right. So how would I declare this dependency setup if I stop
using node files?


Even if you use an ENC, Puppet will still consult your site
manifest, so using an ENC does not preclude you from setting
resource dependencies via collection in your site manifest.



On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis
Ledesma wrote:

Hi

Perhaps  I'm confused but an ENC stores node definition
and not collector nor dependencies...doesn't it?

Regards,

El 03/02/2014 16:13, "Jon Yeargers" 
escribió:

I need to convert my resource based system to ENC.
It's mostly straightforward but I'm not sure how to
handle operations like these:

|Class['apt'] -> Package<| |>|

-- 
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...@googlegroups.com.

To view this discussion on the web visit

https://groups.google.com/d/msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%40googlegroups.com

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

-- 
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...@googlegroups.com
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/puppet-users/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com

.


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


--
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/d0568d5a-450f-45e3-9d4e-7d85e2e07d60%40googlegroups.com.

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


--
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/52F0E059.7000602%40jasonantman.com.

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


--
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...

Re: [Puppet Users] ENC - how to set order of operations?

2014-02-04 Thread Jason Antman

Jon,

I've been using ENCs for quite a while, and have never used them with 
site manifests (or any other manifests outside of modules). At the 
moment, when I do things like that, I either do them inside a class 
(i.e. put what you have in a wrapper class), or use "require" on all 
resource instances.


My plan in the near future, which AFAIK is at least close to best 
practice and is (at least in my opinion) the most elegant and "right" 
way to do this, the is to use run stages to handle all Package resources 
in a "setup" stage, and then add a stage before that that handles 
repository setup. Though this will probably also require a site.pp to 
setup the stage for all Package resources.


For more information on run stages, see:
- http://docs.puppetlabs.com/puppet/3/reference/lang_run_stages.html
- the default stages setup by puppetlabs-stdlib - 
https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/manifests/stages.pp


-Jason

On 02/03/2014 01:51 PM, Jon Yeargers wrote:
So if a given node is named in both an ENC and the site manifest... it 
will use both? IE If I have some definitions that I want to send 
everywhere and others that are node specific.. I can use both types of 
node entries?


On Monday, February 3, 2014 10:14:52 AM UTC-8, Dan Bode wrote:




On Mon, Feb 3, 2014 at 9:45 AM, Jon Yeargers > wrote:

Right. So how would I declare this dependency setup if I stop
using node files?


Even if you use an ENC, Puppet will still consult your site
manifest, so using an ENC does not preclude you from setting
resource dependencies via collection in your site manifest.



On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis
Ledesma wrote:

Hi

Perhaps  I'm confused but an ENC stores node definition
and not collector nor dependencies...doesn't it?

Regards,

El 03/02/2014 16:13, "Jon Yeargers" 
escribió:

I need to convert my resource based system to ENC.
It's mostly straightforward but I'm not sure how to
handle operations like these:

|Class['apt'] -> Package<| |>|

-- 
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...@googlegroups.com.

To view this discussion on the web visit

https://groups.google.com/d/msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%40googlegroups.com

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

-- 
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...@googlegroups.com
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/puppet-users/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com

.


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


--
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/d0568d5a-450f-45e3-9d4e-7d85e2e07d60%40googlegroups.com.

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


--
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/52F0E059.7000602%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread José Luis Ledesma
Then just setup a class and include it on the ENC node definition.

Regards,
El 03/02/2014 19:51, "Jon Yeargers"  escribió:

> So if a given node is named in both an ENC and the site manifest... it
> will use both? IE If I have some definitions that I want to send everywhere
> and others that are node specific.. I can use both types of node entries?
>
> On Monday, February 3, 2014 10:14:52 AM UTC-8, Dan Bode wrote:
>>
>>
>>
>>
>> On Mon, Feb 3, 2014 at 9:45 AM, Jon Yeargers  wrote:
>>
>>> Right. So how would I declare this dependency setup if I stop using node
>>> files?
>>>
>>
>> Even if you use an ENC, Puppet will still consult your site manifest, so
>> using an ENC does not preclude you from setting resource dependencies via
>> collection in your site manifest.
>>
>>
>>>
>>>
>>> On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis Ledesma wrote:
>>>
 Hi

 Perhaps  I'm confused but an ENC stores node definition and not
 collector nor dependencies...doesn't it?

 Regards,
 El 03/02/2014 16:13, "Jon Yeargers"  escribió:

>  I need to convert my resource based system to ENC. It's mostly
> straightforward but I'm not sure how to handle operations like these:
>
> Class['apt'] -> Package<| |>
>
>  --
> 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...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%40goog
> legroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
  --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/puppet-users/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%
>>> 40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> 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/d0568d5a-450f-45e3-9d4e-7d85e2e07d60%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAF_B3dfMebXWLjemQhFj4pgTS_trFgtNOXT_peB%2BSCASY1JHHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread Jon Yeargers
So if a given node is named in both an ENC and the site manifest... it will 
use both? IE If I have some definitions that I want to send everywhere and 
others that are node specific.. I can use both types of node entries?

On Monday, February 3, 2014 10:14:52 AM UTC-8, Dan Bode wrote:
>
>
>
>
> On Mon, Feb 3, 2014 at 9:45 AM, Jon Yeargers 
> > wrote:
>
>> Right. So how would I declare this dependency setup if I stop using node 
>> files?
>>
>
> Even if you use an ENC, Puppet will still consult your site manifest, so 
> using an ENC does not preclude you from setting resource dependencies via 
> collection in your site manifest.
>  
>
>>
>>
>> On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis Ledesma wrote:
>>
>>> Hi
>>>
>>> Perhaps  I'm confused but an ENC stores node definition and not 
>>> collector nor dependencies...doesn't it?
>>>
>>> Regards,
>>> El 03/02/2014 16:13, "Jon Yeargers"  escribió:
>>>
  I need to convert my resource based system to ENC. It's mostly 
 straightforward but I'm not sure how to handle operations like these: 

 Class['apt'] -> Package<| |>

  -- 
 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...@googlegroups.com.

 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%
 40googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

>>>  -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/d0568d5a-450f-45e3-9d4e-7d85e2e07d60%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread Dan Bode
On Mon, Feb 3, 2014 at 9:45 AM, Jon Yeargers  wrote:

> Right. So how would I declare this dependency setup if I stop using node
> files?
>

Even if you use an ENC, Puppet will still consult your site manifest, so
using an ENC does not preclude you from setting resource dependencies via
collection in your site manifest.


>
>
> On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis Ledesma wrote:
>
>> Hi
>>
>> Perhaps  I'm confused but an ENC stores node definition and not collector
>> nor dependencies...doesn't it?
>>
>> Regards,
>> El 03/02/2014 16:13, "Jon Yeargers"  escribió:
>>
>>> I need to convert my resource based system to ENC. It's mostly
>>> straightforward but I'm not sure how to handle operations like these:
>>>
>>> Class['apt'] -> Package<| |>
>>>
>>>  --
>>> 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...@googlegroups.com.
>>>
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%
>>> 40googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>  --
> 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/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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%2B0t2LyhRt64H6gpuAayMeUMHc%2BEXnqpxm5Xnu%3DN7WXjqgyvGA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread José Luis Ledesma
You could set up this on the package class for example, although I don't
know the "best practices" what say about that.

Regards
El 03/02/2014 18:45, "Jon Yeargers"  escribió:

> Right. So how would I declare this dependency setup if I stop using node
> files?
>
> On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis Ledesma wrote:
>>
>> Hi
>>
>> Perhaps  I'm confused but an ENC stores node definition and not collector
>> nor dependencies...doesn't it?
>>
>> Regards,
>> El 03/02/2014 16:13, "Jon Yeargers"  escribió:
>>
>>> I need to convert my resource based system to ENC. It's mostly
>>> straightforward but I'm not sure how to handle operations like these:
>>>
>>> Class['apt'] -> Package<| |>
>>>
>>>  --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%
>>> 40googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>  --
> 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/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAF_B3dfiK9_03Ee%3DLdZANQ51P%3D02mPFpU92c%3Di87mmwDVNLx7w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread Jon Yeargers
Right. So how would I declare this dependency setup if I stop using node 
files?

On Monday, February 3, 2014 9:33:40 AM UTC-8, Jose Luis Ledesma wrote:
>
> Hi
>
> Perhaps  I'm confused but an ENC stores node definition and not collector 
> nor dependencies...doesn't it?
>
> Regards,
> El 03/02/2014 16:13, "Jon Yeargers" > 
> escribió:
>
>> I need to convert my resource based system to ENC. It's mostly 
>> straightforward but I'm not sure how to handle operations like these: 
>>
>> Class['apt'] -> Package<| |>
>>
>>  -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/b6324c21-3725-480d-b2ab-33ee48577ba6%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

-- 
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/89c4d5d6-1f79-454c-8d22-1e1fb9ce15d6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread José Luis Ledesma
Hi

Perhaps  I'm confused but an ENC stores node definition and not collector
nor dependencies...doesn't it?

Regards,
El 03/02/2014 16:13, "Jon Yeargers"  escribió:

> I need to convert my resource based system to ENC. It's mostly
> straightforward but I'm not sure how to handle operations like these:
>
> Class['apt'] -> Package<| |>
>
>  --
> 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/b6324c21-3725-480d-b2ab-33ee48577ba6%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAF_B3dfs%2By97Fz%2Bk%2B-zMKZZADtbsPo4-KGRWrf9x1o1Ogm%2BBEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] ENC - how to set order of operations?

2014-02-03 Thread Jon Yeargers
I need to convert my resource based system to ENC. It's mostly 
straightforward but I'm not sure how to handle operations like these: 

Class['apt'] -> Package<| |>

-- 
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/b6324c21-3725-480d-b2ab-33ee48577ba6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.