[Puppet Users] Sidedoor - Puppet Module

2016-06-01 Thread Warron French

I have created, a Puppet Module using PE-2015.2.

The module is called Sidedoor (as opposed to backdoor) and the intent is 
to do the following (as I am evolving it):


1. Create a system-group with GID=300, and ensure it is in place,
2. Create a user (mine for example) with starting UID=(300 + serial of
   userID {starting at 1...n})

Here is my current manifests/init.pp (and I am not ready for senior 
level programming input/best practices yet), *sidedoor/manifests/init.pp:

*# Class: sidedoor
# ===
#
#
#
class sidedoor {

#  Create a Group for the localusers to be added to.

group { 'sidedoor':
  ensure => 'present',
  system => 'true',
  gid=> '300',
}

user { 'wsf29221':
  ensure   => 'present',
  forcelocal   => 'true',
  password => 
'$6$Bw0KWK673BvjQU/W$WAiTDgk7EN3sD02xUaMngmIB02qQ/G4sRTeP6ySZToWylblcawuekIO4WSUgVMllbjrXP2QOLH96jTfA1xdz1/',

  password_max_age => '180',
  password_min_age => '0',
  gid  => '300',
  uid  => '301',
  comment  => 'Sidedoor_Acct-Warron',
  managehome   => 'true',
  home => '/home/wsf29221',
  shell=> '/bin/bash',
}

file { '/home/wsf29221':
  ensure   => 'directory',
  owner=> '301',
  group=> '300',
  mode => '0750',
  source   => [ "puppet:///modules/sidedoor/files/wsf29221", ],
}

}

*I believe I am not getting the file resource built correctly (yet). * 
The code above *doesn't properly work on a Solaris 10 x86 VM* that I 
have at all; it doesn't even try for some reason, but _more 
importantl_y, it d_oesn't create the homedi_r for the user's account, 
_even though the managehom__e_ attribute is being set.


I have this module written (and tested from) 
/etc/puppetlabs/code/environments/production/modules, and I purposely 
created the wsf29221 user account and it's home directory with matching 
user-attributes to generate a /home/wsf29221 directory; then I copied 
that subdirectory into 
*/etc/puppetlabs/code/environments/production/modules/sidedoor/files/.*


Can someone please help me get the directory creation/population portion 
of this module working?


I am trying to learn how to write modules; not necessarily best 
practices yet.


Thanks,
Warron


--
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/574FA648.1030400%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread Warron French

Thanks Henrik.  I won 't be using it now that I hear that being confirmed.


Thanks everyone,
Warron

On 6/1/2016 10:38 PM, Henrik Lindberg wrote:

On 02/06/16 03:42, Rob Nelson wrote:

Geppetto is definitely heavy. It also looks like development stopped,
last release was over a year ago. It's probably not worth starting to
use it now if it's a dead product.



Geppetto is no longer maintained. If you want an IDE, look at 
Netbeans, or IntelliJ.


- henrik


On Wednesday, June 1, 2016, James Pryor mailto:pryj...@gmail.com>> wrote:

Warron,
Thank you for the the praise.
Geppetto is fine. I used it 2014 & part of 2015. Some people may
disagree, but I found that it (by way of Eclipse) was quite heavy
weight and used lots of CPU and RAM in my workstation. With Geppetto
it was amazing to get all my modules in one place and have it report
static code analysis errors and warnings across all the modules so
that we could fix up our whole codebase. Though that functionality
is available outside of Geppetto via puppet-lint[1] by running it
across all the modules.

When the atom editor[2] came out with version 1.0, I started using
that for about half of my puppet coding with add-on packages for
puppet syntax and linting provided[3]. The other half is done in 
Vim[4]

If you need additional choice of editing tools, checkout the
front-page of the forge[5] and ask questions here on puppet-users
list or on Ask Puppet[6].

Regards,
James

[1] http://puppet-lint.com
[2] https://atom.io/
[3] https://atom.io/packages/search?q=puppet
[4] http://www.vim.org/
[5] https://forge.puppet.com/
[6] https://puppet.com/community/user-groups

On Wed, Jun 1, 2016 at 8:23 PM, warron.french
> wrote:

James, you are awesome!  Thank you.  I wrote my first module, I
am calling it sidedoor, as opposed to backdoor; and it for the
purpose of enabling the creation of accounts on systems to work
around NSS (LDAP, AD, NIS, Samba, etc...) service outage and
have never written one from scratch before.  I have to learn to
write code "in a real world" setting now instead of the Learning
VM where things don't break, but they don't do anything at all
either.

So, while I am at home sick this week, I have been taking
advantage of the opportunity to write a module, test it with
puppet apply --noop, and then commit the module (this last step
you helped me with).  This link did help me.

Unfortunately, I think my prior instance of PE -2015.2 was
totally busted for some reason - not sure why, so I had to
rebuild from scratch.

By the way, do you know how to use the Gepetto IDE for writing
Puppet Modules?


Thanks again, that link helped me to at least get the module
recognized; now at least next time I know to look for updating
the cache of the Puppet Master to the web interface - and
waiting for 3 minutes.

--
Warron French


On Wed, Jun 1, 2016 at 3:31 PM, James Pryor > wrote:

I have personal experience with PE 2015.2 thus I knew what
to look for, so I think this will help you.
https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
and search the page for the word refresh.

I found this by doing a google search on: puppet enterprise
console refresh
and then chose the 2015.2 documentation on the
docs.puppet.com  website.

I recommend reading all the documentation once. Yes it eats
up a ton of time and you might not make immediate progress
with Puppet Enterprise, but the docs cover important
foundation info so much that your familiarity with the docs
will eventually make you speed up.

Regards,
James


On Wed, Jun 1, 2016 at 3:20 PM, warron.french
>
wrote:

Another question...
 I have rebuilt my Puppetmaster (as some of you
already know), and
copied into place a module I wrote into -
*/etc/puppetlabs/code/environments/production/modules.*
*
*
However, when I go into the Puppet Admin Console, into
the Classification tab.  When I try to "pull up" my
module to classify my nodes; the module name doesn't
show up in the list.


How do I make the module show up in the list? Did I
miss a step?


--
Warron French

--
You received this message because you are subscribed to
the Google Groups "Puppet 

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread Warron French
Thanks Rob, then I won't bother with it.  I will stick to the generic 
commands built into the Puppet Master, and use vi(m) and see if I can 
make it work with GitHub.com - to develop an improved understanding of 
the full lifecycle process for developing a Puppet Module from scratch.




On 6/1/2016 9:42 PM, Rob Nelson wrote:
Geppetto is definitely heavy. It also looks like development stopped, 
last release was over a year ago. It's probably not worth starting to 
use it now if it's a dead product.


On Wednesday, June 1, 2016, James Pryor > wrote:


Warron,
Thank you for the the praise.
Geppetto is fine. I used it 2014 & part of 2015. Some people may
disagree, but I found that it (by way of Eclipse) was quite heavy
weight and used lots of CPU and RAM in my workstation. With
Geppetto it was amazing to get all my modules in one place and
have it report static code analysis errors and warnings across all
the modules so that we could fix up our whole codebase. Though
that functionality is available outside of Geppetto via
puppet-lint[1] by running it across all the modules.

When the atom editor[2] came out with version 1.0, I started using
that for about half of my puppet coding with add-on packages for
puppet syntax and linting provided[3]. The other half is done in
Vim[4]
If you need additional choice of editing tools, checkout the
front-page of the forge[5] and ask questions here on puppet-users
list or on Ask Puppet[6].

Regards,
James

[1] http://puppet-lint.com
[2] https://atom.io/
[3] https://atom.io/packages/search?q=puppet
[4] http://www.vim.org/
[5] https://forge.puppet.com/
[6] https://puppet.com/community/user-groups

On Wed, Jun 1, 2016 at 8:23 PM, warron.french
> wrote:

James, you are awesome!  Thank you.  I wrote my first module,
I am calling it sidedoor, as opposed to backdoor; and it for
the purpose of enabling the creation of accounts on systems to
work around NSS (LDAP, AD, NIS, Samba, etc...) service outage
and have never written one from scratch before.  I have to
learn to write code "in a real world" setting now instead of
the Learning VM where things don't break, but they don't do
anything at all either.

So, while I am at home sick this week, I have been taking
advantage of the opportunity to write a module, test it with
puppet apply --noop, and then commit the module (this last
step you helped me with).  This link did help me.

Unfortunately, I think my prior instance of PE -2015.2 was
totally busted for some reason - not sure why, so I had to
rebuild from scratch.

By the way, do you know how to use the Gepetto IDE for writing
Puppet Modules?


Thanks again, that link helped me to at least get the module
recognized; now at least next time I know to look for updating
the cache of the Puppet Master to the web interface - and
waiting for 3 minutes.

--
Warron French


On Wed, Jun 1, 2016 at 3:31 PM, James Pryor > wrote:

I have personal experience with PE 2015.2 thus I knew what
to look for, so I think this will help you.

https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
and search the page for the word refresh.

I found this by doing a google search on: puppet
enterprise console refresh
and then chose the 2015.2 documentation on the
docs.puppet.com  website.

I recommend reading all the documentation once. Yes it
eats up a ton of time and you might not make immediate
progress with Puppet Enterprise, but the docs cover
important foundation info so much that your familiarity
with the docs will eventually make you speed up.

Regards,
James


On Wed, Jun 1, 2016 at 3:20 PM, warron.french
>
wrote:

Another question...
 I have rebuilt my Puppetmaster (as some of you
already know), and
copied into place a module I wrote into -
*/etc/puppetlabs/code/environments/production/modules.*
*
*
However, when I go into the Puppet Admin Console, into
the Classification tab.  When I try to "pull up" my
module to classify my nodes; the module name doesn't
show up in the list.


How do I make the module show up in the list?  Did I
miss a step?


--
Warron French

-- 
You received this m

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread Warron French

Thanks for the feedback about Gepetto, James.

I tried to start using it last year, and learning to use that tool went 
sideways on me.  I have written shell scripts for the past 20+ years, 
but I don't really write programs anymore (in C, C++, Fortran or even 
Pascal); so I think I first need to learn how to write a module without 
it to get down the basics.  Afterwards, I can then maybe figure out how 
to get Gepetto to actually work with a VMware instance of Puppet running 
in my Windows PC, and also somehow figure out how to get the Git hooks 
into place as well.


Anyway, thanks again.  I have more questions about the module I am 
writing (this process is truly evolving my understanding), so I will be 
posting another separate thread about that next.

--Warron

On 6/1/2016 9:21 PM, James Pryor wrote:

Warron,
Thank you for the the praise.
Geppetto is fine. I used it 2014 & part of 2015. Some people may 
disagree, but I found that it (by way of Eclipse) was quite heavy 
weight and used lots of CPU and RAM in my workstation. With Geppetto 
it was amazing to get all my modules in one place and have it report 
static code analysis errors and warnings across all the modules so 
that we could fix up our whole codebase. Though that functionality is 
available outside of Geppetto via puppet-lint[1] by running it across 
all the modules.


When the atom editor[2] came out with version 1.0, I started using 
that for about half of my puppet coding with add-on packages for 
puppet syntax and linting provided[3]. The other half is done in Vim[4]
If you need additional choice of editing tools, checkout the 
front-page of the forge[5] and ask questions here on puppet-users list 
or on Ask Puppet[6].


Regards,
James

[1] http://puppet-lint.com
[2] https://atom.io/
[3] https://atom.io/packages/search?q=puppet
[4] http://www.vim.org/
[5] https://forge.puppet.com/
[6] https://puppet.com/community/user-groups

On Wed, Jun 1, 2016 at 8:23 PM, warron.french > wrote:


James, you are awesome!  Thank you.  I wrote my first module, I am
calling it sidedoor, as opposed to backdoor; and it for the
purpose of enabling the creation of accounts on systems to work
around NSS (LDAP, AD, NIS, Samba, etc...) service outage and have
never written one from scratch before.  I have to learn to write
code "in a real world" setting now instead of the Learning VM
where things don't break, but they don't do anything at all either.

So, while I am at home sick this week, I have been taking
advantage of the opportunity to write a module, test it with
puppet apply --noop, and then commit the module (this last step
you helped me with).  This link did help me.

Unfortunately, I think my prior instance of PE -2015.2 was totally
busted for some reason - not sure why, so I had to rebuild from
scratch.

By the way, do you know how to use the Gepetto IDE for writing
Puppet Modules?


Thanks again, that link helped me to at least get the module
recognized; now at least next time I know to look for updating the
cache of the Puppet Master to the web interface - and waiting for
3 minutes.

--
Warron French


On Wed, Jun 1, 2016 at 3:31 PM, James Pryor mailto:pryj...@gmail.com>> wrote:

I have personal experience with PE 2015.2 thus I knew what to
look for, so I think this will help you.

https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
and search the page for the word refresh.

I found this by doing a google search on: puppet enterprise
console refresh
and then chose the 2015.2 documentation on the docs.puppet.com
 website.

I recommend reading all the documentation once. Yes it eats up
a ton of time and you might not make immediate progress with
Puppet Enterprise, but the docs cover important foundation
info so much that your familiarity with the docs will
eventually make you speed up.

Regards,
James


On Wed, Jun 1, 2016 at 3:20 PM, warron.french
mailto:warron.fre...@gmail.com>> wrote:

Another question...
 I have rebuilt my Puppetmaster (as some of you
already know), and
copied into place a module I wrote into -
*/etc/puppetlabs/code/environments/production/modules.*
*
*
However, when I go into the Puppet Admin Console, into the
Classification tab.  When I try to "pull up" my module to
classify my nodes; the module name doesn't show up in the
list.


How do I make the module show up in the list?  Did I miss
a step?


--
Warron French

-- 
You received this message because you a

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread Henrik Lindberg

On 02/06/16 03:42, Rob Nelson wrote:

Geppetto is definitely heavy. It also looks like development stopped,
last release was over a year ago. It's probably not worth starting to
use it now if it's a dead product.



Geppetto is no longer maintained. If you want an IDE, look at Netbeans, 
or IntelliJ.


- henrik


On Wednesday, June 1, 2016, James Pryor mailto:pryj...@gmail.com>> wrote:

Warron,
Thank you for the the praise.
Geppetto is fine. I used it 2014 & part of 2015. Some people may
disagree, but I found that it (by way of Eclipse) was quite heavy
weight and used lots of CPU and RAM in my workstation. With Geppetto
it was amazing to get all my modules in one place and have it report
static code analysis errors and warnings across all the modules so
that we could fix up our whole codebase. Though that functionality
is available outside of Geppetto via puppet-lint[1] by running it
across all the modules.

When the atom editor[2] came out with version 1.0, I started using
that for about half of my puppet coding with add-on packages for
puppet syntax and linting provided[3]. The other half is done in Vim[4]
If you need additional choice of editing tools, checkout the
front-page of the forge[5] and ask questions here on puppet-users
list or on Ask Puppet[6].

Regards,
James

[1] http://puppet-lint.com
[2] https://atom.io/
[3] https://atom.io/packages/search?q=puppet
[4] http://www.vim.org/
[5] https://forge.puppet.com/
[6] https://puppet.com/community/user-groups

On Wed, Jun 1, 2016 at 8:23 PM, warron.french
> wrote:

James, you are awesome!  Thank you.  I wrote my first module, I
am calling it sidedoor, as opposed to backdoor; and it for the
purpose of enabling the creation of accounts on systems to work
around NSS (LDAP, AD, NIS, Samba, etc...) service outage and
have never written one from scratch before.  I have to learn to
write code "in a real world" setting now instead of the Learning
VM where things don't break, but they don't do anything at all
either.

So, while I am at home sick this week, I have been taking
advantage of the opportunity to write a module, test it with
puppet apply --noop, and then commit the module (this last step
you helped me with).  This link did help me.

Unfortunately, I think my prior instance of PE -2015.2 was
totally busted for some reason - not sure why, so I had to
rebuild from scratch.

By the way, do you know how to use the Gepetto IDE for writing
Puppet Modules?


Thanks again, that link helped me to at least get the module
recognized; now at least next time I know to look for updating
the cache of the Puppet Master to the web interface - and
waiting for 3 minutes.

--
Warron French


On Wed, Jun 1, 2016 at 3:31 PM, James Pryor > wrote:

I have personal experience with PE 2015.2 thus I knew what
to look for, so I think this will help you.

https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
and search the page for the word refresh.

I found this by doing a google search on: puppet enterprise
console refresh
and then chose the 2015.2 documentation on the
docs.puppet.com  website.

I recommend reading all the documentation once. Yes it eats
up a ton of time and you might not make immediate progress
with Puppet Enterprise, but the docs cover important
foundation info so much that your familiarity with the docs
will eventually make you speed up.

Regards,
James


On Wed, Jun 1, 2016 at 3:20 PM, warron.french
>
wrote:

Another question...
 I have rebuilt my Puppetmaster (as some of you
already know), and
copied into place a module I wrote into -
*/etc/puppetlabs/code/environments/production/modules.*
*
*
However, when I go into the Puppet Admin Console, into
the Classification tab.  When I try to "pull up" my
module to classify my nodes; the module name doesn't
show up in the list.


How do I make the module show up in the list?  Did I
miss a step?


--
Warron French

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

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread Rob Nelson
Geppetto is definitely heavy. It also looks like development stopped, last
release was over a year ago. It's probably not worth starting to use it now
if it's a dead product.

On Wednesday, June 1, 2016, James Pryor  wrote:

> Warron,
> Thank you for the the praise.
> Geppetto is fine. I used it 2014 & part of 2015. Some people may disagree,
> but I found that it (by way of Eclipse) was quite heavy weight and used
> lots of CPU and RAM in my workstation. With Geppetto it was amazing to get
> all my modules in one place and have it report static code analysis errors
> and warnings across all the modules so that we could fix up our whole
> codebase. Though that functionality is available outside of Geppetto via
> puppet-lint[1] by running it across all the modules.
>
> When the atom editor[2] came out with version 1.0, I started using that
> for about half of my puppet coding with add-on packages for puppet syntax
> and linting provided[3]. The other half is done in Vim[4]
> If you need additional choice of editing tools, checkout the front-page of
> the forge[5] and ask questions here on puppet-users list or on Ask
> Puppet[6].
>
> Regards,
> James
>
> [1] http://puppet-lint.com
> [2] https://atom.io/
> [3] https://atom.io/packages/search?q=puppet
> [4] http://www.vim.org/
> [5] https://forge.puppet.com/
> [6] https://puppet.com/community/user-groups
>
> On Wed, Jun 1, 2016 at 8:23 PM, warron.french  > wrote:
>
>> James, you are awesome!  Thank you.  I wrote my first module, I am
>> calling it sidedoor, as opposed to backdoor; and it for the purpose of
>> enabling the creation of accounts on systems to work around NSS (LDAP, AD,
>> NIS, Samba, etc...) service outage and have never written one from scratch
>> before.  I have to learn to write code "in a real world" setting now
>> instead of the Learning VM where things don't break, but they don't do
>> anything at all either.
>>
>> So, while I am at home sick this week, I have been taking advantage of
>> the opportunity to write a module, test it with puppet apply --noop, and
>> then commit the module (this last step you helped me with).  This link did
>> help me.
>>
>> Unfortunately, I think my prior instance of PE -2015.2 was totally busted
>> for some reason - not sure why, so I had to rebuild from scratch.
>>
>> By the way, do you know how to use the Gepetto IDE for writing Puppet
>> Modules?
>>
>>
>> Thanks again, that link helped me to at least get the module recognized;
>> now at least next time I know to look for updating the cache of the Puppet
>> Master to the web interface - and waiting for 3 minutes.
>>
>> --
>> Warron French
>>
>>
>> On Wed, Jun 1, 2016 at 3:31 PM, James Pryor > > wrote:
>>
>>> I have personal experience with PE 2015.2 thus I knew what to look for,
>>> so I think this will help you.
>>>
>>> https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
>>> and search the page for the word refresh.
>>>
>>> I found this by doing a google search on: puppet enterprise console
>>> refresh
>>> and then chose the 2015.2 documentation on the docs.puppet.com website.
>>>
>>> I recommend reading all the documentation once. Yes it eats up a ton of
>>> time and you might not make immediate progress with Puppet Enterprise, but
>>> the docs cover important foundation info so much that your familiarity with
>>> the docs will eventually make you speed up.
>>>
>>> Regards,
>>> James
>>>
>>>
>>> On Wed, Jun 1, 2016 at 3:20 PM, warron.french >> > wrote:
>>>
 Another question...
  I have rebuilt my Puppetmaster (as some of you already know), and
 copied into place a module I wrote into -
 */etc/puppetlabs/code/environments/production/modules.*

 However, when I go into the Puppet Admin Console, into the
 Classification tab.  When I try to "pull up" my module to classify my
 nodes; the module name doesn't show up in the list.


 How do I make the module show up in the list?  Did I miss a step?


 --
 Warron French

 --
 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/CAJdJdQkSAbQj1ChFkm3%3DEd7Car4LWvNojkM11XQwC-kpVTmxdg%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...@googlegro

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread James Pryor
Warron,
Thank you for the the praise.
Geppetto is fine. I used it 2014 & part of 2015. Some people may disagree,
but I found that it (by way of Eclipse) was quite heavy weight and used
lots of CPU and RAM in my workstation. With Geppetto it was amazing to get
all my modules in one place and have it report static code analysis errors
and warnings across all the modules so that we could fix up our whole
codebase. Though that functionality is available outside of Geppetto via
puppet-lint[1] by running it across all the modules.

When the atom editor[2] came out with version 1.0, I started using that for
about half of my puppet coding with add-on packages for puppet syntax and
linting provided[3]. The other half is done in Vim[4]
If you need additional choice of editing tools, checkout the front-page of
the forge[5] and ask questions here on puppet-users list or on Ask
Puppet[6].

Regards,
James

[1] http://puppet-lint.com
[2] https://atom.io/
[3] https://atom.io/packages/search?q=puppet
[4] http://www.vim.org/
[5] https://forge.puppet.com/
[6] https://puppet.com/community/user-groups

On Wed, Jun 1, 2016 at 8:23 PM, warron.french 
wrote:

> James, you are awesome!  Thank you.  I wrote my first module, I am calling
> it sidedoor, as opposed to backdoor; and it for the purpose of enabling the
> creation of accounts on systems to work around NSS (LDAP, AD, NIS, Samba,
> etc...) service outage and have never written one from scratch before.  I
> have to learn to write code "in a real world" setting now instead of the
> Learning VM where things don't break, but they don't do anything at all
> either.
>
> So, while I am at home sick this week, I have been taking advantage of the
> opportunity to write a module, test it with puppet apply --noop, and then
> commit the module (this last step you helped me with).  This link did help
> me.
>
> Unfortunately, I think my prior instance of PE -2015.2 was totally busted
> for some reason - not sure why, so I had to rebuild from scratch.
>
> By the way, do you know how to use the Gepetto IDE for writing Puppet
> Modules?
>
>
> Thanks again, that link helped me to at least get the module recognized;
> now at least next time I know to look for updating the cache of the Puppet
> Master to the web interface - and waiting for 3 minutes.
>
> --
> Warron French
>
>
> On Wed, Jun 1, 2016 at 3:31 PM, James Pryor  wrote:
>
>> I have personal experience with PE 2015.2 thus I knew what to look for,
>> so I think this will help you.
>>
>> https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
>> and search the page for the word refresh.
>>
>> I found this by doing a google search on: puppet enterprise console
>> refresh
>> and then chose the 2015.2 documentation on the docs.puppet.com website.
>>
>> I recommend reading all the documentation once. Yes it eats up a ton of
>> time and you might not make immediate progress with Puppet Enterprise, but
>> the docs cover important foundation info so much that your familiarity with
>> the docs will eventually make you speed up.
>>
>> Regards,
>> James
>>
>>
>> On Wed, Jun 1, 2016 at 3:20 PM, warron.french 
>> wrote:
>>
>>> Another question...
>>>  I have rebuilt my Puppetmaster (as some of you already know), and
>>> copied into place a module I wrote into -
>>> */etc/puppetlabs/code/environments/production/modules.*
>>>
>>> However, when I go into the Puppet Admin Console, into the
>>> Classification tab.  When I try to "pull up" my module to classify my
>>> nodes; the module name doesn't show up in the list.
>>>
>>>
>>> How do I make the module show up in the list?  Did I miss a step?
>>>
>>>
>>> --
>>> Warron French
>>>
>>> --
>>> 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/CAJdJdQkSAbQj1ChFkm3%3DEd7Car4LWvNojkM11XQwC-kpVTmxdg%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/CAOsPUciQfxwvP_Qt17yzpowoVAMLMV0fyCZvm7tp8iVxo%3D6X8w%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.g

Re: [Puppet Users] Puppet 4.5 and git & R10K

2016-06-01 Thread Alex Samad
Hi

So I have 

https://rnelson0.com/2014/05/19/puppet-and-git-201-r10k-setup-installation/ 
or
http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/

Currently stuck on the control-repo 
https://github.com/puppetlabs/control-repo

I have cloned their repo to my work box

git clone https://github.com/puppetlabs/control-repo

replaced origin with my destination. I prepped the destination with git 
init --bare

then do the push. but all i get is the logs.

when I do a clone of my repo into another directoy on my work box I get no 
files.

So I thought different approach 
create the repo (puppet.git) with --bare on my internet git server
create a new git repo on my work box and then copy over all the files from 
the control-repo into my repo minus the .git directory 
then I can commit and push back up to my git server.

But branches ??? I read I need to have a production branch ...






On Thursday, 2 June 2016 10:04:52 UTC+10, Alex Samad wrote:
>
> Oh... 
>
> Okay now I am getting lost :) Sorry trying to multi task.
>
> I will go back to the docu & link and see which I need to do.
>
> But I believe I am at the setup git / r10k stage ...
>
>
>
>
> On Wednesday, 1 June 2016 12:51:06 UTC+10, Rob Nelson wrote:
>>
>> Just to be sure, code manager is PE only. It looks like you're using 
>> Puppet Opensource instead.
>>
>> On Tuesday, May 31, 2016, Alex Samad  wrote:
>>
>>> Answer my own question (and for any one following on)
>>>
>>> going to use
>>> https://docs.puppet.com/pe/2016.1/cmgmt_managing_code.html
>>> https://docs.puppet.com/pe/2016.1/cmgmt_control_repo.html
>>>
>>> for the setup and then back to
>>>
>>> http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/
>>>
>>> https://rnelson0.com/2014/05/19/puppet-and-git-201-r10k-setup-installation/
>>>
>>>
>>>
>>>
>>>
>>> On 1 June 2016 at 10:56, Alex Samad  wrote:
>>> > Hi
>>> >
>>> > Lowe - okay - so I presume by that it doesn't come as a centos rpm ..
>>> > Rob - yes
>>> > Lee
>>> >
>>> >
>>> > So it looks like (more for my documentation )
>>> >
>>> > install the puppet repo into centos
>>> > install the puppet base components (DB, server, agent)
>>> >
>>> > Then I can install r10k via puppet ?
>>> >
>>> > i'm looking at this
>>> > https://docs.puppet.com/pe/2016.1/cmgmt_managing_code.html
>>> >
>>> > should I follow this to setup ?
>>> >
>>> >
>>> > "
>>> > If you are already using r10k to manage your Puppet code, we suggest
>>> > that you upgrade to Code Manager. Code Manager works in concert with
>>> > r10k, so when you switch to Code Manager, you no longer interact
>>> > directly with r10k.
>>> > "
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On 31 May 2016 at 16:58, Lee DaeHyung  wrote:
>>> >> Hi
>>> >>
>>> >> I think you could see this page first: 
>>> https://forge.puppet.com/zack/r10k
>>> >> and this
>>> >> 
>>> http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/
>>> >>
>>> >> These will guide you how to use it.
>>> >>
>>> >>
>>> >>
>>> >> 2016년 5월 31일 화요일 오후 3시 40분 49초 UTC+9, Alex Samad 님의 말:
>>> >>>
>>> >>> Hi
>>> >>>
>>> >>> New install, I am doing this on Centos 6.x
>>> >>> I have installed the repo RPM
>>> >>>
>>> >>> I believe this is PC1 repo
>>> >>>
>>> >>>
>>> >>> yum --disablerepo '*' --enablerepo puppetlabs-pc1 list | grep
>>> >>> puppetlabs-pc1
>>> >>> puppet-agent.x86_64  1.5.0-1.el6
>>> >>> @puppetlabs-pc1
>>> >>> puppetdb.noarch  4.1.0-1.el6
>>> >>> @puppetlabs-pc1
>>> >>> puppetdb-termini.noarch  4.1.0-1.el6
>>> >>> @puppetlabs-pc1
>>> >>> puppetserver.noarch  2.4.0-1.el6
>>> >>> @puppetlabs-pc1
>>> >>> puppet-client-tools.x86_64   1.0.0-1.el6
>>> >>> puppetlabs-pc1
>>> >>> puppetdb-terminus.noarch 3-1.el6
>>> >>> puppetlabs-pc1
>>> >>>
>>> >>> I believe I have installed puppet , server , db and agent.
>>> >>>
>>> >>> But I can't find r10k
>>> >>>
>>> >>> rpm -qa | grep puppet
>>> >>> puppetdb-4.1.0-1.el6.noarch
>>> >>> puppet-agent-1.5.0-1.el6.x86_64
>>> >>> puppetserver-2.4.0-1.el6.noarch
>>> >>> puppetdb-termini-4.1.0-1.el6.noarch
>>> >>> puppetlabs-release-pc1-1.0.0-2.el6.noarch
>>> >>>
>>> >>> I was following Rob's blog for puppet r10K + git and couldn't find
>>> >>> /etc/r10k.yaml
>>> >>>
>>> >>> so how do I install r10k :)
>>> >>>
>>> >> --
>>> >> You received this message because you are subscribed to a topic in the
>>> >> Google Groups "Puppet Users" group.
>>> >> To unsubscribe from this topic, visit
>>> >> 
>>> https://groups.google.com/d/topic/puppet-users/836ysw94ya4/unsubscribe.
>>> >> To unsubscribe from this group and all its topics, 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/e3d27c2a-4604-4c0d-9f31-d17dba05ef17%40googlegroups.com
>>> .
>>> >>
>>> >> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because y

Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread warron.french
James, you are awesome!  Thank you.  I wrote my first module, I am calling
it sidedoor, as opposed to backdoor; and it for the purpose of enabling the
creation of accounts on systems to work around NSS (LDAP, AD, NIS, Samba,
etc...) service outage and have never written one from scratch before.  I
have to learn to write code "in a real world" setting now instead of the
Learning VM where things don't break, but they don't do anything at all
either.

So, while I am at home sick this week, I have been taking advantage of the
opportunity to write a module, test it with puppet apply --noop, and then
commit the module (this last step you helped me with).  This link did help
me.

Unfortunately, I think my prior instance of PE -2015.2 was totally busted
for some reason - not sure why, so I had to rebuild from scratch.

By the way, do you know how to use the Gepetto IDE for writing Puppet
Modules?


Thanks again, that link helped me to at least get the module recognized;
now at least next time I know to look for updating the cache of the Puppet
Master to the web interface - and waiting for 3 minutes.

--
Warron French


On Wed, Jun 1, 2016 at 3:31 PM, James Pryor  wrote:

> I have personal experience with PE 2015.2 thus I knew what to look for, so
> I think this will help you.
>
> https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
> and search the page for the word refresh.
>
> I found this by doing a google search on: puppet enterprise console refresh
> and then chose the 2015.2 documentation on the docs.puppet.com website.
>
> I recommend reading all the documentation once. Yes it eats up a ton of
> time and you might not make immediate progress with Puppet Enterprise, but
> the docs cover important foundation info so much that your familiarity with
> the docs will eventually make you speed up.
>
> Regards,
> James
>
>
> On Wed, Jun 1, 2016 at 3:20 PM, warron.french 
> wrote:
>
>> Another question...
>>  I have rebuilt my Puppetmaster (as some of you already know), and
>> copied into place a module I wrote into -
>> */etc/puppetlabs/code/environments/production/modules.*
>>
>> However, when I go into the Puppet Admin Console, into the Classification
>> tab.  When I try to "pull up" my module to classify my nodes; the module
>> name doesn't show up in the list.
>>
>>
>> How do I make the module show up in the list?  Did I miss a step?
>>
>>
>> --
>> Warron French
>>
>> --
>> 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/CAJdJdQkSAbQj1ChFkm3%3DEd7Car4LWvNojkM11XQwC-kpVTmxdg%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/CAOsPUciQfxwvP_Qt17yzpowoVAMLMV0fyCZvm7tp8iVxo%3D6X8w%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/CAJdJdQkRpt8avZU98wdU5QpXeuNiBXz-e6jfcPTRQ3n8v51DQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet 4.5 and git & R10K

2016-06-01 Thread Alex Samad
Oh... 

Okay now I am getting lost :) Sorry trying to multi task.

I will go back to the docu & link and see which I need to do.

But I believe I am at the setup git / r10k stage ...




On Wednesday, 1 June 2016 12:51:06 UTC+10, Rob Nelson wrote:
>
> Just to be sure, code manager is PE only. It looks like you're using 
> Puppet Opensource instead.
>
> On Tuesday, May 31, 2016, Alex Samad > 
> wrote:
>
>> Answer my own question (and for any one following on)
>>
>> going to use
>> https://docs.puppet.com/pe/2016.1/cmgmt_managing_code.html
>> https://docs.puppet.com/pe/2016.1/cmgmt_control_repo.html
>>
>> for the setup and then back to
>>
>> http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/
>>
>> https://rnelson0.com/2014/05/19/puppet-and-git-201-r10k-setup-installation/
>>
>>
>>
>>
>>
>> On 1 June 2016 at 10:56, Alex Samad  wrote:
>> > Hi
>> >
>> > Lowe - okay - so I presume by that it doesn't come as a centos rpm ..
>> > Rob - yes
>> > Lee
>> >
>> >
>> > So it looks like (more for my documentation )
>> >
>> > install the puppet repo into centos
>> > install the puppet base components (DB, server, agent)
>> >
>> > Then I can install r10k via puppet ?
>> >
>> > i'm looking at this
>> > https://docs.puppet.com/pe/2016.1/cmgmt_managing_code.html
>> >
>> > should I follow this to setup ?
>> >
>> >
>> > "
>> > If you are already using r10k to manage your Puppet code, we suggest
>> > that you upgrade to Code Manager. Code Manager works in concert with
>> > r10k, so when you switch to Code Manager, you no longer interact
>> > directly with r10k.
>> > "
>> >
>> >
>> >
>> >
>> >
>> > On 31 May 2016 at 16:58, Lee DaeHyung  wrote:
>> >> Hi
>> >>
>> >> I think you could see this page first: 
>> https://forge.puppet.com/zack/r10k
>> >> and this
>> >> 
>> http://garylarizza.com/blog/2014/08/31/r10k-plus-directory-environments/
>> >>
>> >> These will guide you how to use it.
>> >>
>> >>
>> >>
>> >> 2016년 5월 31일 화요일 오후 3시 40분 49초 UTC+9, Alex Samad 님의 말:
>> >>>
>> >>> Hi
>> >>>
>> >>> New install, I am doing this on Centos 6.x
>> >>> I have installed the repo RPM
>> >>>
>> >>> I believe this is PC1 repo
>> >>>
>> >>>
>> >>> yum --disablerepo '*' --enablerepo puppetlabs-pc1 list | grep
>> >>> puppetlabs-pc1
>> >>> puppet-agent.x86_64  1.5.0-1.el6
>> >>> @puppetlabs-pc1
>> >>> puppetdb.noarch  4.1.0-1.el6
>> >>> @puppetlabs-pc1
>> >>> puppetdb-termini.noarch  4.1.0-1.el6
>> >>> @puppetlabs-pc1
>> >>> puppetserver.noarch  2.4.0-1.el6
>> >>> @puppetlabs-pc1
>> >>> puppet-client-tools.x86_64   1.0.0-1.el6
>> >>> puppetlabs-pc1
>> >>> puppetdb-terminus.noarch 3-1.el6
>> >>> puppetlabs-pc1
>> >>>
>> >>> I believe I have installed puppet , server , db and agent.
>> >>>
>> >>> But I can't find r10k
>> >>>
>> >>> rpm -qa | grep puppet
>> >>> puppetdb-4.1.0-1.el6.noarch
>> >>> puppet-agent-1.5.0-1.el6.x86_64
>> >>> puppetserver-2.4.0-1.el6.noarch
>> >>> puppetdb-termini-4.1.0-1.el6.noarch
>> >>> puppetlabs-release-pc1-1.0.0-2.el6.noarch
>> >>>
>> >>> I was following Rob's blog for puppet r10K + git and couldn't find
>> >>> /etc/r10k.yaml
>> >>>
>> >>> so how do I install r10k :)
>> >>>
>> >> --
>> >> You received this message because you are subscribed to a topic in the
>> >> Google Groups "Puppet Users" group.
>> >> To unsubscribe from this topic, visit
>> >> https://groups.google.com/d/topic/puppet-users/836ysw94ya4/unsubscribe
>> .
>> >> To unsubscribe from this group and all its topics, 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/e3d27c2a-4604-4c0d-9f31-d17dba05ef17%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/CAJ%2BQ1PUihWLQK8dfL-JP7q3Shrxq8ow44hXjKuFxvn-10Jr2_Q%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> Rob Nelson
> rnel...@gmail.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/f859cbbe-e214-4478-b6a3-79e65cbdf593%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trying to understand hiera and use in site.pp

2016-06-01 Thread Rob Nelson
"Works" in this case would mean that when you set ntp::service_enable:
false, on the next puppet run, the service would be disabled. If that's the
case, hiera is working and any errors are likely to do with typos or yaml
formatting issues with the other settings.


Rob Nelson
rnels...@gmail.com

On Wed, Jun 1, 2016 at 2:14 PM, Courtney Campbell  wrote:

> It does work, but it is not taking the setting in 6.yaml. It is setting
> the defaults.
>
> On Wednesday, June 1, 2016 at 11:58:26 AM UTC-5, Rob Nelson wrote:
>>
>> Can you show what happens on a brand new CentOS 6 or 7 node when you run
>> `puppet agent -t`? It should work the way you expect, though the
>> service_enable and service_ensure settings match the default, so there
>> won't be that much different.
>>
>> If it is working, but the output isn't clear on that, you could try
>> running puppet against it as is, then turn one of the service_* values to
>> false/stopped and you should see the state change. If it changes from
>> running to stopped, and back again if you revert the changes, you know
>> things are working. If not, it gets you closer to the issue.
>>
>>
>> Rob Nelson
>> rnel...@gmail.com
>>
>> On Wed, Jun 1, 2016 at 12:00 PM, Courtney Campbell 
>> wrote:
>>
>>> I just upgraded to puppet 3.8. Things I used to do in 3.7 like import
>>> and inherits no longer work. Anyway, I have been trying to figure out
>>> hiera. The docs on the site are great if you already know what you are
>>> doing. Anyway, I have environments setup. And have the hiera.yaml setup and
>>> working. Here is the hiera.yaml.
>>>
>>> ---
>>> :backends:
>>>   - yaml
>>> :yaml:
>>>   :datadir: "/etc/puppet/environments/%{::environment}/hieradata"
>>> :hierarchy:
>>>   - "nodes/%{::trusted.certname}"
>>>   - "%{::osfamily}/%{::operatingsystemmajrelease}"
>>>   - "virtual/%{::virtual}"
>>>   - "common"
>>>
>>>
>>> under my development einvironment I have
>>>
>>> RedHat/6.yaml
>>> RedHat/7.yaml
>>>
>>> 6.yaml has info for ntp and 7.yaml has info for chrony.
>>>
>>> 6.yaml
>>> ---
>>> ntp::restrict: 127.0.0.1
>>> ntp::service_enable: true
>>> ntp::service_ensure: running
>>> ntp::servers:
>>>   - ntp.server.com
>>>
>>> 7.yaml
>>> ---
>>> chrony::service_enable: true
>>> chrony::service_ensure: running
>>> chrony::servers:
>>>   - ntp.server.com
>>>
>>> That all looks fine and hiera test works.
>>> $ hiera ntp::service_enable ::environment=development ::osfamily=RedHat
>>> ::operatingsystemmajrelease=6
>>> true
>>>
>>> Now I am unsre how to make use of this in  my site.pp.
>>>
>>> I have this, but it is not working:
>>>
>>> if $operatingsystemmajrelease =~ '6' {
>>>include ntp
>>> }
>>> elsif $operatingsystemmajrelease == '7' {
>>>include chrony
>>> }
>>>
>>> It's setting the ntp.conf and chrony.conf files to the defaults. I
>>> really like puppet when it is working. But trying to figure this out is
>>> just pissing me off. I wish there was a doc that would hold my hand and
>>> just give exact examples on how to get this to work. It's not intuitive.
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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/62c54869-4f91-449f-bf31-3f720db862ab%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/51dbad04-15e6-4600-824b-814f5beb9e98%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/CAC76iT85q4wHV_ofHF-%2BCfQosLJdtZ%3DvNFJ3iVX%2BZN0rQb-Ccg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread James Pryor
I have personal experience with PE 2015.2 thus I knew what to look for, so
I think this will help you.
https://docs.puppet.com/pe/2015.2/console_classes_groups.html#adding-classes-to-a-node-group
and search the page for the word refresh.

I found this by doing a google search on: puppet enterprise console refresh
and then chose the 2015.2 documentation on the docs.puppet.com website.

I recommend reading all the documentation once. Yes it eats up a ton of
time and you might not make immediate progress with Puppet Enterprise, but
the docs cover important foundation info so much that your familiarity with
the docs will eventually make you speed up.

Regards,
James


On Wed, Jun 1, 2016 at 3:20 PM, warron.french 
wrote:

> Another question...
>  I have rebuilt my Puppetmaster (as some of you already know), and
> copied into place a module I wrote into -
> */etc/puppetlabs/code/environments/production/modules.*
>
> However, when I go into the Puppet Admin Console, into the Classification
> tab.  When I try to "pull up" my module to classify my nodes; the module
> name doesn't show up in the list.
>
>
> How do I make the module show up in the list?  Did I miss a step?
>
>
> --
> Warron French
>
> --
> 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/CAJdJdQkSAbQj1ChFkm3%3DEd7Car4LWvNojkM11XQwC-kpVTmxdg%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/CAOsPUciQfxwvP_Qt17yzpowoVAMLMV0fyCZvm7tp8iVxo%3D6X8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to get modules recognized for use during classification

2016-06-01 Thread warron.french
Another question...
 I have rebuilt my Puppetmaster (as some of you already know), and
copied into place a module I wrote into -
*/etc/puppetlabs/code/environments/production/modules.*

However, when I go into the Puppet Admin Console, into the Classification
tab.  When I try to "pull up" my module to classify my nodes; the module
name doesn't show up in the list.


How do I make the module show up in the list?  Did I miss a step?


--
Warron French

-- 
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/CAJdJdQkSAbQj1ChFkm3%3DEd7Car4LWvNojkM11XQwC-kpVTmxdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trying to understand hiera and use in site.pp

2016-06-01 Thread Courtney Campbell
Nor does it take the settings on a 7 server. Just sets the defaults of the 
module.

On Wednesday, June 1, 2016 at 1:14:15 PM UTC-5, Courtney Campbell wrote:
>
> It does work, but it is not taking the setting in 6.yaml. It is setting 
> the defaults.
>
> On Wednesday, June 1, 2016 at 11:58:26 AM UTC-5, Rob Nelson wrote:
>>
>> Can you show what happens on a brand new CentOS 6 or 7 node when you run 
>> `puppet agent -t`? It should work the way you expect, though the 
>> service_enable and service_ensure settings match the default, so there 
>> won't be that much different.
>>
>> If it is working, but the output isn't clear on that, you could try 
>> running puppet against it as is, then turn one of the service_* values to 
>> false/stopped and you should see the state change. If it changes from 
>> running to stopped, and back again if you revert the changes, you know 
>> things are working. If not, it gets you closer to the issue.
>>
>>
>> Rob Nelson
>> rnel...@gmail.com
>>
>> On Wed, Jun 1, 2016 at 12:00 PM, Courtney Campbell  
>> wrote:
>>
>>> I just upgraded to puppet 3.8. Things I used to do in 3.7 like import 
>>> and inherits no longer work. Anyway, I have been trying to figure out 
>>> hiera. The docs on the site are great if you already know what you are 
>>> doing. Anyway, I have environments setup. And have the hiera.yaml setup and 
>>> working. Here is the hiera.yaml.
>>>
>>> ---
>>> :backends:
>>>   - yaml
>>> :yaml:
>>>   :datadir: "/etc/puppet/environments/%{::environment}/hieradata"
>>> :hierarchy:
>>>   - "nodes/%{::trusted.certname}"
>>>   - "%{::osfamily}/%{::operatingsystemmajrelease}"
>>>   - "virtual/%{::virtual}"
>>>   - "common"
>>>
>>>
>>> under my development einvironment I have 
>>>
>>> RedHat/6.yaml
>>> RedHat/7.yaml
>>>
>>> 6.yaml has info for ntp and 7.yaml has info for chrony.
>>>
>>> 6.yaml
>>> ---
>>> ntp::restrict: 127.0.0.1
>>> ntp::service_enable: true
>>> ntp::service_ensure: running
>>> ntp::servers:
>>>   - ntp.server.com
>>>
>>> 7.yaml
>>> ---
>>> chrony::service_enable: true
>>> chrony::service_ensure: running
>>> chrony::servers:
>>>   - ntp.server.com
>>>
>>> That all looks fine and hiera test works.
>>> $ hiera ntp::service_enable ::environment=development ::osfamily=RedHat 
>>> ::operatingsystemmajrelease=6
>>> true
>>>
>>> Now I am unsre how to make use of this in  my site.pp.
>>>
>>> I have this, but it is not working:
>>>
>>> if $operatingsystemmajrelease =~ '6' {
>>>include ntp
>>> }
>>> elsif $operatingsystemmajrelease == '7' {
>>>include chrony
>>> }
>>>
>>> It's setting the ntp.conf and chrony.conf files to the defaults. I 
>>> really like puppet when it is working. But trying to figure this out is 
>>> just pissing me off. I wish there was a doc that would hold my hand and 
>>> just give exact examples on how to get this to work. It's not intuitive.
>>>
>>>
>>>
>>>
>>>
>>>
>>> -- 
>>> 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/62c54869-4f91-449f-bf31-3f720db862ab%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/ed391d95-225e-4b5d-9c2d-26ccf5800ade%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trying to understand hiera and use in site.pp

2016-06-01 Thread Courtney Campbell
It does work, but it is not taking the setting in 6.yaml. It is setting the 
defaults.

On Wednesday, June 1, 2016 at 11:58:26 AM UTC-5, Rob Nelson wrote:
>
> Can you show what happens on a brand new CentOS 6 or 7 node when you run 
> `puppet agent -t`? It should work the way you expect, though the 
> service_enable and service_ensure settings match the default, so there 
> won't be that much different.
>
> If it is working, but the output isn't clear on that, you could try 
> running puppet against it as is, then turn one of the service_* values to 
> false/stopped and you should see the state change. If it changes from 
> running to stopped, and back again if you revert the changes, you know 
> things are working. If not, it gets you closer to the issue.
>
>
> Rob Nelson
> rnel...@gmail.com 
>
> On Wed, Jun 1, 2016 at 12:00 PM, Courtney Campbell  > wrote:
>
>> I just upgraded to puppet 3.8. Things I used to do in 3.7 like import and 
>> inherits no longer work. Anyway, I have been trying to figure out hiera. 
>> The docs on the site are great if you already know what you are doing. 
>> Anyway, I have environments setup. And have the hiera.yaml setup and 
>> working. Here is the hiera.yaml.
>>
>> ---
>> :backends:
>>   - yaml
>> :yaml:
>>   :datadir: "/etc/puppet/environments/%{::environment}/hieradata"
>> :hierarchy:
>>   - "nodes/%{::trusted.certname}"
>>   - "%{::osfamily}/%{::operatingsystemmajrelease}"
>>   - "virtual/%{::virtual}"
>>   - "common"
>>
>>
>> under my development einvironment I have 
>>
>> RedHat/6.yaml
>> RedHat/7.yaml
>>
>> 6.yaml has info for ntp and 7.yaml has info for chrony.
>>
>> 6.yaml
>> ---
>> ntp::restrict: 127.0.0.1
>> ntp::service_enable: true
>> ntp::service_ensure: running
>> ntp::servers:
>>   - ntp.server.com
>>
>> 7.yaml
>> ---
>> chrony::service_enable: true
>> chrony::service_ensure: running
>> chrony::servers:
>>   - ntp.server.com
>>
>> That all looks fine and hiera test works.
>> $ hiera ntp::service_enable ::environment=development ::osfamily=RedHat 
>> ::operatingsystemmajrelease=6
>> true
>>
>> Now I am unsre how to make use of this in  my site.pp.
>>
>> I have this, but it is not working:
>>
>> if $operatingsystemmajrelease =~ '6' {
>>include ntp
>> }
>> elsif $operatingsystemmajrelease == '7' {
>>include chrony
>> }
>>
>> It's setting the ntp.conf and chrony.conf files to the defaults. I really 
>> like puppet when it is working. But trying to figure this out is just 
>> pissing me off. I wish there was a doc that would hold my hand and just 
>> give exact examples on how to get this to work. It's not intuitive.
>>
>>
>>
>>
>>
>>
>> -- 
>> 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/62c54869-4f91-449f-bf31-3f720db862ab%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/51dbad04-15e6-4600-824b-814f5beb9e98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet parameterized class not skipping the same version of software

2016-06-01 Thread Harish Kothuri
It works as expected after providing name to the package. 






*class ctf ($version) {  $ctfdest = sprintf('C:\PuppetSWT\CTF-%s.exe', 
$version)   package { 'CTF':  name => 'CTF-'${version},
  ensure   => 'installed',  source   => $ctfdest,  
install_options  => [ '/S' ],  }}*


On Tuesday, May 31, 2016 at 7:31:08 PM UTC+5:30, Harish Kothuri wrote:
>
> Hi All,
>
> I have a puppet class which accepts parameter "$version" for a software 
> package. 
>
> The problem is when i do puppet agent -t , it is installing the software 
> package though the same version is present already. All works fine if i 
> remove the parameter to a class and hard code the version.
>
> Below is my code for with and without parameter to a class
>
> *With Parameter:(DOES NOT SKIP installation- PROBLEMATIC)*
>
>
>
>
> *class ctf ($version) {  $ctfdest = sprintf('C:\PuppetSWT\CTF-%s.exe', 
> $version)   package { 'CTF':  ensure   => 'installed',  
> source   => $ctfdest,  install_options  => [ '/S' ],  }}*
>
>
> *Without Parameter: (SKIPS installation when i run second time- EXPECTED)*
>
>
>
>
>
> *class ctf_v_1_3_8 {$ctfdest = 'C:\PuppetSWT\CTF-1.3.8.exe'  package { 
> 'CTF-1.3.8':ensure => 'installed',source => 
> $ctfdest,install_options => [ '/S' ],  }}This is going to be major 
> problem as i dont want to end up in creating multiple classes for different 
> versions , can someone help to understand why this different behavior and 
> solution.?Thanks a lot.*
>

-- 
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/2a55dc06-398b-4f10-8c84-c27984f3b9c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re-issuing agent certs from a newer Puppet Master

2016-06-01 Thread warron.french
Thanks to you both Rob and Andy.


--
Warron French


On Wed, Jun 1, 2016 at 12:53 PM, Rob Nelson  wrote:

> If you run `puppet agent -t [--server ]` and there is a mismatch, it
> should provide directions to remedy the situation. In your case, wiping out
> the ssldir on the client should suffice.
>
>
> Rob Nelson
> rnels...@gmail.com
>
> On Wed, Jun 1, 2016 at 12:39 PM, warron.french 
> wrote:
>
>> Hello again,
>> I have a a few Puppet Agents on to which I installed the puppet-agent
>> software from my first Puppetmaster1, however, something happened and I had
>> to rebuild that server - for labelling purposes I am (in this email)
>> calling it Puppetmaster2.
>>
>> The puppet agents all have their certs signed by Puppetmaster1, but that
>> server no longer exist and now I have Puppetmaster2 (still the same
>> hostname actually).
>>
>>
>> How do I associate the puppet-agent nodes with the newer Puppetmaster2
>> server properly?
>>
>> Do I execute an: *rpm -e puppet-agent* on all of the nodes, and then
>> re-run the *curl *command to properly re-install and generate a new
>> certificate from the newer Puppetmaster2 (puppetmaster)?
>>
>> Do I just go onto each of the nodes and simply remove the ssl
>> subdirectory and then re-run the: *puppet agent -t* command (which
>> didn't seem fail, or show its certificate up on the Puppet Admin Console)?
>>
>>
>> Thanks for the help,
>>
>> --
>> Warron French
>>
>> --
>> 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/CAJdJdQmKtCk%3DqeSoDxZVyBw%2BuaCVDzLg%2B%3D7-b58hobm0GUOZGQ%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/CAC76iT_1CTMxht8Hs3pDOG_89a9kq9-Eg--oY33zipTb%2Bz_yqg%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/CAJdJdQmyQ4KjDmdqoFtTj4CT7S%2BsNo9rE1mRLnB%3Dm4ZHYg5zpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Trying to understand hiera and use in site.pp

2016-06-01 Thread Rob Nelson
Can you show what happens on a brand new CentOS 6 or 7 node when you run
`puppet agent -t`? It should work the way you expect, though the
service_enable and service_ensure settings match the default, so there
won't be that much different.

If it is working, but the output isn't clear on that, you could try running
puppet against it as is, then turn one of the service_* values to
false/stopped and you should see the state change. If it changes from
running to stopped, and back again if you revert the changes, you know
things are working. If not, it gets you closer to the issue.


Rob Nelson
rnels...@gmail.com

On Wed, Jun 1, 2016 at 12:00 PM, Courtney Campbell 
wrote:

> I just upgraded to puppet 3.8. Things I used to do in 3.7 like import and
> inherits no longer work. Anyway, I have been trying to figure out hiera.
> The docs on the site are great if you already know what you are doing.
> Anyway, I have environments setup. And have the hiera.yaml setup and
> working. Here is the hiera.yaml.
>
> ---
> :backends:
>   - yaml
> :yaml:
>   :datadir: "/etc/puppet/environments/%{::environment}/hieradata"
> :hierarchy:
>   - "nodes/%{::trusted.certname}"
>   - "%{::osfamily}/%{::operatingsystemmajrelease}"
>   - "virtual/%{::virtual}"
>   - "common"
>
>
> under my development einvironment I have
>
> RedHat/6.yaml
> RedHat/7.yaml
>
> 6.yaml has info for ntp and 7.yaml has info for chrony.
>
> 6.yaml
> ---
> ntp::restrict: 127.0.0.1
> ntp::service_enable: true
> ntp::service_ensure: running
> ntp::servers:
>   - ntp.server.com
>
> 7.yaml
> ---
> chrony::service_enable: true
> chrony::service_ensure: running
> chrony::servers:
>   - ntp.server.com
>
> That all looks fine and hiera test works.
> $ hiera ntp::service_enable ::environment=development ::osfamily=RedHat
> ::operatingsystemmajrelease=6
> true
>
> Now I am unsre how to make use of this in  my site.pp.
>
> I have this, but it is not working:
>
> if $operatingsystemmajrelease =~ '6' {
>include ntp
> }
> elsif $operatingsystemmajrelease == '7' {
>include chrony
> }
>
> It's setting the ntp.conf and chrony.conf files to the defaults. I really
> like puppet when it is working. But trying to figure this out is just
> pissing me off. I wish there was a doc that would hold my hand and just
> give exact examples on how to get this to work. It's not intuitive.
>
>
>
>
>
>
> --
> 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/62c54869-4f91-449f-bf31-3f720db862ab%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/CAC76iT-QZLNN4S%3DdJk_nBYYvN9e7iYONO0W0mFPA7HtSS%2BHuxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re-issuing agent certs from a newer Puppet Master

2016-06-01 Thread Rob Nelson
If you run `puppet agent -t [--server ]` and there is a mismatch, it
should provide directions to remedy the situation. In your case, wiping out
the ssldir on the client should suffice.


Rob Nelson
rnels...@gmail.com

On Wed, Jun 1, 2016 at 12:39 PM, warron.french 
wrote:

> Hello again,
> I have a a few Puppet Agents on to which I installed the puppet-agent
> software from my first Puppetmaster1, however, something happened and I had
> to rebuild that server - for labelling purposes I am (in this email)
> calling it Puppetmaster2.
>
> The puppet agents all have their certs signed by Puppetmaster1, but that
> server no longer exist and now I have Puppetmaster2 (still the same
> hostname actually).
>
>
> How do I associate the puppet-agent nodes with the newer Puppetmaster2
> server properly?
>
> Do I execute an: *rpm -e puppet-agent* on all of the nodes, and then
> re-run the *curl *command to properly re-install and generate a new
> certificate from the newer Puppetmaster2 (puppetmaster)?
>
> Do I just go onto each of the nodes and simply remove the ssl subdirectory
> and then re-run the: *puppet agent -t* command (which didn't seem fail,
> or show its certificate up on the Puppet Admin Console)?
>
>
> Thanks for the help,
>
> --
> Warron French
>
> --
> 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/CAJdJdQmKtCk%3DqeSoDxZVyBw%2BuaCVDzLg%2B%3D7-b58hobm0GUOZGQ%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/CAC76iT_1CTMxht8Hs3pDOG_89a9kq9-Eg--oY33zipTb%2Bz_yqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re-issuing agent certs from a newer Puppet Master

2016-06-01 Thread Andrew Grimberg
On 06/01/2016 09:39 AM, warron.french wrote:
> Hello again,
> I have a a few Puppet Agents on to which I installed the
> puppet-agent software from my first Puppetmaster1, however, something
> happened and I had to rebuild that server - for labelling purposes I am
> (in this email) calling it Puppetmaster2.
> 
> The puppet agents all have their certs signed by Puppetmaster1, but that
> server no longer exist and now I have Puppetmaster2 (still the same
> hostname actually).
> 
> 
> How do I associate the puppet-agent nodes with the newer Puppetmaster2
> server properly?
> 
> Do I execute an: *rpm -e puppet-agent* on all of the nodes, and then
> re-run the *curl *command to properly re-install and generate a new
> certificate from the newer Puppetmaster2 (puppetmaster)?
> 
> Do I just go onto each of the nodes and simply remove the ssl
> subdirectory and then re-run the: *puppet agent -t* command (which
> didn't seem fail, or show its certificate up on the Puppet Admin Console)?

Assuming that re-running 'puppet agent -t' would cause the systems to
look at your new puppet master then the following should be all you need
to do:

On the nodes, assuming an EL7 system and the latest puppet since you
said puppet-agent for your package:

--[cut]--
systemctl stop puppet
rm -rf /etc/puppetlabs/puppet/ssl/*
puppet agent -t --waitforcert 60
# assuming your current manifests don't force the agent to restart
systemctl start puppet
--[/cut]--

On the puppet master, accept the new node

-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/574F116A.20504%40bardicgrove.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


[Puppet Users] Re-issuing agent certs from a newer Puppet Master

2016-06-01 Thread warron.french
Hello again,
I have a a few Puppet Agents on to which I installed the puppet-agent
software from my first Puppetmaster1, however, something happened and I had
to rebuild that server - for labelling purposes I am (in this email)
calling it Puppetmaster2.

The puppet agents all have their certs signed by Puppetmaster1, but that
server no longer exist and now I have Puppetmaster2 (still the same
hostname actually).


How do I associate the puppet-agent nodes with the newer Puppetmaster2
server properly?

Do I execute an: *rpm -e puppet-agent* on all of the nodes, and then re-run
the *curl *command to properly re-install and generate a new certificate
from the newer Puppetmaster2 (puppetmaster)?

Do I just go onto each of the nodes and simply remove the ssl subdirectory
and then re-run the: *puppet agent -t* command (which didn't seem fail, or
show its certificate up on the Puppet Admin Console)?


Thanks for the help,

--
Warron French

-- 
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/CAJdJdQmKtCk%3DqeSoDxZVyBw%2BuaCVDzLg%2B%3D7-b58hobm0GUOZGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Custom Facts for windows with powershell

2016-06-01 Thread John Ericson
Thanks for clarifying!

I changed it to include the regexp fix:

Get-ItemProperty 
HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | 
where{$_.DisplayName -and $_.displayname -notmatch 'Update'} | 
Select-Object DisplayName, DisplayVersion | ForEach-Object {$factName = 
$_.DisplayName -replace '-', '_'; $version = $_.DisplayVersion; Write-Host 
$factName"="$version}

On Wednesday, June 1, 2016 at 5:18:51 AM UTC+2, Harish Kothuri wrote:
>
> Hello All,
>
> Everything works fine after removing 7-Zip software. Looks like highphen 
> (-) is having a problem in the name. You can also use regex to avoid those.
>
> Thanks
>
> On Wednesday, June 1, 2016 at 1:29:07 AM UTC+5:30, John Ericson wrote:
>>
>> Hi Harish!
>>
>> This fact looks really interesting. I'm interested in doing the same 
>> thing in my environment. Did you solve the problem? And if so, do you care 
>> to share your solution?
>>
>> Regards,
>> John
>>
>> On Monday, May 23, 2016 at 8:08:29 PM UTC+2, Harish Kothuri wrote:
>>>
>>> Hi, 
>>>
>>> I'm trying to create a custom fact to get the installed software using 
>>> powershell command in windows as follows...
>>>
>>>
>>> *PS Command:-* 
>>> Get-ItemProperty 
>>> HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | 
>>> where{$_.DisplayName -and $_.displayname -notmatch 'Update'} | 
>>> Select-Object DisplayName, DisplayVersion | ForEach-Object {Write-Host 
>>> $_.DisplayName"="$_.DisplayVersion}
>>>
>>> *Output:-*
>>> 7-Zip 15.14 = 15.14
>>> ActiveState ActiveTcl 8.4.20.0 = 8.4.20.0
>>> Microsoft .NET Framework 4 Client Profile = 4.0.30319
>>> Microsoft .NET Framework 4 Extended = 4.0.30319
>>> Notepad++ = 6.9.1
>>> Microsoft .NET Framework 4 Extended = 4.0.30319
>>> Puppet = 3.8.7
>>> Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030 = 
>>> 11.0.61030.0
>>> Microsoft .NET Framework 4 Client Profile = 4.0.30319
>>> MSXML 4.0 SP2 Parser and SDK = 4.20.9818.0
>>> Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17 = 9.0.30729
>>> VC9.0 SP0 Debug CRT DLLs = 1.0.0
>>> Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030 = 
>>> 11.0.61030
>>> Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030 = 11.0.61030
>>> Microsoft Visual C++ 2010  x86 Redistributable - 10.0.40219 = 10.0.40219
>>> ActivePerl 5.16.3 Build 1603 = 5.16.1603
>>>
>>>
>>> i have created a powershellscript like  getinstalledlist.ps1 with above 
>>> command and placed in facters.d folder. 
>>>
>>> When i run puppet agent -t , i get the following error.
>>>
>>> Error: Could not retrieve catalog from remote server: Error 400 on 
>>> SERVER: Failed to parse inline template: `@7_zip_15_14 . 
>>>
>>>
>>> Can someone help me to get this going?
>>>
>>> Thanks & Regards,
>>> Harish Kothuri
>>>
>>

-- 
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/1135ea29-ae56-43ee-8709-85d04fd8a598%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet environments..

2016-06-01 Thread Courtney Campbell
I just set this up myself. You need to create your environments directory 
structures is you haven't already.

/etc/puppet/environment/{dev|prod)/(manifests|modules|environment.conf|hierdata)

Hope you understand that. Then you need to change your puppet.conf on the 
master. Add these lines under main

environmentpath = $confdir/environments
basemodulepath = $confdir/modules:/opt/puppet/share/puppet/modules

Then under each environement, add this to environment.conf

modulepath = $confdir/environments/development/modules:$basemodulepath
manifest = $confdir/environments/development/manifests/

Now on your agents, just add a line like this under main

environment = development or environment = production.

Now when you run the agent(s), it should pull the data from under the 
environements manifests directory.

On Thursday, May 26, 2016 at 8:45:54 AM UTC-5, John Doe wrote:
>
> Hey,
>
> I been stuck for a while with this now.
>
> Thing is that I can't understand how tell puppetmaster to issue different 
> environments for the agent. I see in Puppet Enterprise everything is 
> explained very well and detailed, but in open source version everything 
> looks very messy, there is no clear picture how things should look like.
>
> The most confusing part here for me is that how to TEACH puppetmaster 
> identify nodes and then assign them to appropriate 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/4c80ce94-9521-4ed5-9436-aaa488c38dd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Trying to understand hiera and use in site.pp

2016-06-01 Thread Courtney Campbell
I just upgraded to puppet 3.8. Things I used to do in 3.7 like import and 
inherits no longer work. Anyway, I have been trying to figure out hiera. 
The docs on the site are great if you already know what you are doing. 
Anyway, I have environments setup. And have the hiera.yaml setup and 
working. Here is the hiera.yaml.

---
:backends:
  - yaml
:yaml:
  :datadir: "/etc/puppet/environments/%{::environment}/hieradata"
:hierarchy:
  - "nodes/%{::trusted.certname}"
  - "%{::osfamily}/%{::operatingsystemmajrelease}"
  - "virtual/%{::virtual}"
  - "common"


under my development einvironment I have 

RedHat/6.yaml
RedHat/7.yaml

6.yaml has info for ntp and 7.yaml has info for chrony.

6.yaml
---
ntp::restrict: 127.0.0.1
ntp::service_enable: true
ntp::service_ensure: running
ntp::servers:
  - ntp.server.com

7.yaml
---
chrony::service_enable: true
chrony::service_ensure: running
chrony::servers:
  - ntp.server.com

That all looks fine and hiera test works.
$ hiera ntp::service_enable ::environment=development ::osfamily=RedHat 
::operatingsystemmajrelease=6
true

Now I am unsre how to make use of this in  my site.pp.

I have this, but it is not working:

if $operatingsystemmajrelease =~ '6' {
   include ntp
}
elsif $operatingsystemmajrelease == '7' {
   include chrony
}

It's setting the ntp.conf and chrony.conf files to the defaults. I really 
like puppet when it is working. But trying to figure this out is just 
pissing me off. I wish there was a doc that would hold my hand and just 
give exact examples on how to get this to work. It's not intuitive.






-- 
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/62c54869-4f91-449f-bf31-3f720db862ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] facter 3 behaviour change in vlan interface legacy facts

2016-06-01 Thread Christopher Wood
This is something I found after upgrading a number of puppet agents from 3.8.5 
to 4.4.2 using the puppet-agent-1.4.2-1.el6.x86_64.rpm rpm on CentOS 6. The 
legacy fact names around vlan interfaces are not the same as the facter2 
versions of those facts.

facter < 3: ipaddress_eth0_413

facter >= 3: ipaddress_eth0.413

There was a pull request to have this change implemented in facter 2 but that 
wasn't merged. I wasn't able to find any ticket about behavioural change for 
these facts in facter 3. I tried digging through the facter code but am not a 
programmer and couldn't figure out where this fact name is set in cfacter.

https://github.com/puppetlabs/facter/pull/835
https://tickets.puppetlabs.com/browse/FACT-775

FACT-701 appears related, only in so far as it covers the same set of facts.

https://tickets.puppetlabs.com/browse/FACT-701

The upshot is that I probably should already have converted to the facter 3 
structured facts. Anybody else using vlan'ed networking and the associated 
facts in puppet3/facter2 should probably check their modules.




++

More details:

To make a long story short, we are managing some vlan interfaces on eth0 using 
stanzas like the inline template below. This is to figure out the nfs ip 
address on the host to construct an ip address for use on another vlan'ed 
interface. That's life when workarounds are built on workarounds.

$nfs_if_ip = inline_template('<%= x = "ipaddress_eth0_" + 
@cluster_nfs_vlan.to_s; scope[x] %>')

In facter < 3, that fact was ipaddress_eth0_413. In facter >= 3, that fact is 
ipaddress_eth0.413 (underline versus dot). The latter format mirrors what you 
would see with "ip a s" which would give vlan'ed interfaces such as 
eth0.413@eth0.

The upshot is that the "unless" parameter of the exec bringing up the interface 
ended up being...

/sbin/ip addr show eth0.601 | grep -q 10.106.2./24

...instead of...

/sbin/ip addr show eth0.601 | grep -q 10.106.2.84/24

...and that failed 'unless' let forth the error spew.

Notice: /Stage[main]/Hnet/Exec[/sbin/ip link add link eth0 name eth0.601 type 
vlan id 601 && /sbin/ip addr add 10.106.2./24 dev eth0.601 label eth0.601 && 
/sbin/ip link set eth0.601 up]/returns: RTNETLINK answers: File exists
Error: /sbin/ip link add link eth0 name eth0.601 type vlan id 601 && /sbin/ip 
addr add 10.106.2./24 dev eth0.601 label eth0.601 && /sbin/ip link set eth0.601 
up returned 2 instead of one of [0]
Error: /Stage[main]/Hnet/Exec[/sbin/ip link add link eth0 name eth0.601 type 
vlan id 601 && /sbin/ip addr add 10.106.2./24 dev eth0.601 label eth0.601 && 
/sbin/ip link set eth0.601 up]/returns: change from notrun to 0 failed: 
/sbin/ip link add link eth0 name eth0.601 type vlan id 601 && /sbin/ip addr add 
10.106.2./24 dev eth0.601 label eth0.601 && /sbin/ip link set eth0.601 up 
returned 2 instead of one of [0]


Here's narrowing down where this change takes place. Pasting my rough notes. 
I've obfuscated the hostname and non-RFC-1918 ip address.


puppet-agent-1.0.0-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.0.0
[root@host ~]# facter --version
2.4.3
[root@host ~]# facter -p | grep ipaddress_eth0
ipaddress_eth0 => 1.2.3.4
ipaddress_eth0_413 => 10.101.13.84
ipaddress_eth0_601 => 10.106.2.84


puppet-agent-1.1.1-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.1.0
[root@host ~]# facter --version
2.4.4
[root@host ~]# facter -p | grep ipaddress_eth0
ipaddress_eth0 => 1.2.3.4
ipaddress_eth0_413 => 10.101.13.84
ipaddress_eth0_601 => 10.106.2.84


puppet-agent-1.2.0-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.2.0
[root@host ~]# facter --version
3.0.0 (commit 6a22df024ddfe7759f55d05a5ac1c8c51cb2c4aa)

(no ipaddress_eth0 legacy facts, same as below)


puppet-agent-1.2.1-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.2.0
[root@host ~]# facter --version
3.0.1 (commit 9b1ef723a1494a01e0eccfe93a75fd43316690c2)
[root@host ~]# facter -p --show-legacy | grep ipaddress_eth0
error: unrecognised option '-p'

[root@host ~]# facter --show-legacy | grep ipaddress_eth0
error: unrecognised option '--show-legacy'


puppet-agent-1.2.1-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.2.1
[root@host ~]# facter --version
3.0.2 (commit 5dc120fa9db4c19150466b1bbd1d0cf42c87c6bd)
[root@host ~]# facter -p --show-legacy | grep ipaddress_eth0
ipaddress_eth0 => 1.2.3.4
ipaddress_eth0.413 => 10.101.13.84
ipaddress_eth0.601 => 10.106.2.84


puppet-agent-1.2.4-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.2.2
[root@host ~]# facter --version
3.1.0 (commit fc7614d6ba81845757ba7318269fad2b2da08da3)
[root@host ~]# facter -p --show-legacy | grep ipaddress_eth0
ipaddress_eth0 => 1.2.3.4
ipaddress_eth0.413 => 10.101.13.84
ipaddress_eth0.601 => 10.106.2.84


puppet-agent-1.2.7-1.el6.x86_64.rpm

[root@host ~]# puppet --version
4.2.3
[root@host ~]# facter --version
3.1.1 (commit 30d2dfd3ede25be8a02cdb5b0811d84c5c92c709)
[root@host ~]# facte

[Puppet Users] setting modulepath

2016-06-01 Thread warron.french
Hello,
   I am trying to learn to write puppet code (in very small steps).

I am using PE-2015.2 that I installed from tarball onto a CentOS-6.8
virtual machine running in Oracle VBox.

I have mounted a directory from my Windows PC into my Puppetmaster (running
in the CentOS-6.8 virtual machine).  I would like to add it to the Puppet
Configuration's modulepath.

I am having a difficulty find *THE*correct way to do this so that I can
test my module without moving directories back and forth between authoring
and testing the code, and having it easily submit-table to my github
directory.


Can someone help please?

--
Warron French

-- 
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/CAJdJdQkfy3C4Y6veZrdOHpeLYzz31i8Hy8g8Wx_AnMiapekxwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to access $facts['os'] in a manifest

2016-06-01 Thread Henrik Lindberg

On 01/06/16 16:43, Marc Haber wrote:

Hi,

I have the following code:

if( $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] 
== '7' ) {
file { "...":
ensure  => 'file',
path=> "...",
content => "...",
}
}

My agent is puppet 3.8.4, my master is 3.7.3 with no special
configuration.

Here is the fact:

$ facter | grep ^os
os => {"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"2", "full"=>"7.2.1511"}, "lsb"=>{"distcodename"=>"Core", "distid"=>"CentOS", 
"distdescription"=>"CentOS Linux release 7.2.1511 (Core) ", "release"=>":core-4.1-amd64:core-4.1-noarch", "distrelease"=>"7.2.1511", "majdistrelease"=>"7", "minordistrelease"=>"2"}}
osfamily => RedHat

When building the catalog, I get the dreaded "facts is not a hash or
array". When searching for this, I get tangled in a maze of "if your
agent is older than foo, and your server has stringify_bla set, then
you might succeed with baz."

How do I write my manifest to get things

(a) pretty
(b) non-deprecated?

Any hints will be appreciated.



First check what you get in puppet with a simple manifest:

notice($facts)

If all the data elements are strings, turn off stringify_facts - it 
flattens data and makes all facts be strings.


Hope that helps.

If you can, hop on to the puppet slack or IRC channels to get more help 
from community members - always easier interactively.


- henrik
--

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/79c526e1-9c08-ed82-0b70-93f23bb189d9%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to access $facts['os'] in a manifest

2016-06-01 Thread Marc Haber
Hi,

I have the following code:

if( $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] 
== '7' ) {
file { "...":
ensure  => 'file',
path=> "...",
content => "...",
}
}

My agent is puppet 3.8.4, my master is 3.7.3 with no special
configuration.

Here is the fact:

$ facter | grep ^os
os => {"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", 
"minor"=>"2", "full"=>"7.2.1511"}, "lsb"=>{"distcodename"=>"Core", 
"distid"=>"CentOS", "distdescription"=>"CentOS Linux release 7.2.1511 (Core) ", 
"release"=>":core-4.1-amd64:core-4.1-noarch", "distrelease"=>"7.2.1511", 
"majdistrelease"=>"7", "minordistrelease"=>"2"}}
osfamily => RedHat

When building the catalog, I get the dreaded "facts is not a hash or
array". When searching for this, I get tangled in a maze of "if your
agent is older than foo, and your server has stringify_bla set, then
you might succeed with baz."

How do I write my manifest to get things

(a) pretty
(b) non-deprecated?

Any hints will be appreciated.

Greetings
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062

-- 
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/20160601144332.GA24651%40torres.zugschlus.de.
For more options, visit https://groups.google.com/d/optout.