[Puppet Users] Re: Puppet upgrade broke puppet agent on my Oracle Linux 5 and 6 boxes

2017-02-02 Thread Kenton Brede
Strange.  It ended up being all my notify attributes quit working.  A
restart of puppetserver solved the issue.

Kenton Brede





On Thu, Feb 2, 2017 at 3:24 PM, Kenton Brede <kbr...@gmail.com> wrote:

> As it turns out the agents.pp file is on my puppetmaster.  If I comment
> out my 'mcollective' module then the next module in line, 'nagios' has
> issues:
>
> Error: Failed to apply catalog: Could not find dependent Service[nrpe] for
> File[/etc/nagios/nrpe.cfg] at /etc/puppetlabs/code/
> environments/production/modules/nagios/manifests/files.pp:7
>
>
>
>
>
> Kenton Brede
>
>
>
>
>
> On Thu, Feb 2, 2017 at 3:02 PM, Kenton Brede <kbr...@gmail.com> wrote:
>
>> On ol7 boxes the puppet agent is working fine.
>>
>> This is what I have installed on one of my ol6 boxes:
>>
>> # rpm -qa |grep puppet
>> mcollective-puppet-common-1.11.1-1.el6.noarch
>> puppetlabs-release-22.0-2.noarch
>> puppetlabs-release-pc1-1.1.0-5.el6.noarch
>> mcollective-puppet-agent-1.11.1-1.el6.noarch
>> puppet-agent-1.9.0-1.el6.x86_64
>>
>> This is the error I'm getting:
>>
>> Error: Failed to apply catalog: Could not find dependent
>> Service[mcollective] for 
>> File[/usr/libexec/mcollective/mcollective/agent/shell.ddl]
>> at /etc/puppetlabs/code/environments/production/modules/
>> mcollective/manifests/agents.pp:12
>>
>> There is no agents.pp file on my systems.
>>
>> This is an empty directory:
>>
>> /etc/puppetlabs/code/environments/production/modules/
>>
>> Anyone know how to recover from this?  I'm in the process of trying to
>> provision a ol6 box and can't.
>>
>> Thanks,
>>
>> Kenton Brede
>>
>>
>>
>>
>>
>

-- 
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%2BnSE38_%3DM__0ri7yW1%2Bb6OQrzZaXmJJx0cFk%2B-DurOXj1MeZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet upgrade broke puppet agent on my Oracle Linux 5 and 6 boxes

2017-02-02 Thread Kenton Brede
As it turns out the agents.pp file is on my puppetmaster.  If I comment out
my 'mcollective' module then the next module in line, 'nagios' has issues:

Error: Failed to apply catalog: Could not find dependent Service[nrpe] for
File[/etc/nagios/nrpe.cfg] at
/etc/puppetlabs/code/environments/production/modules/nagios/manifests/files.pp:7





Kenton Brede





On Thu, Feb 2, 2017 at 3:02 PM, Kenton Brede <kbr...@gmail.com> wrote:

> On ol7 boxes the puppet agent is working fine.
>
> This is what I have installed on one of my ol6 boxes:
>
> # rpm -qa |grep puppet
> mcollective-puppet-common-1.11.1-1.el6.noarch
> puppetlabs-release-22.0-2.noarch
> puppetlabs-release-pc1-1.1.0-5.el6.noarch
> mcollective-puppet-agent-1.11.1-1.el6.noarch
> puppet-agent-1.9.0-1.el6.x86_64
>
> This is the error I'm getting:
>
> Error: Failed to apply catalog: Could not find dependent
> Service[mcollective] for 
> File[/usr/libexec/mcollective/mcollective/agent/shell.ddl]
> at /etc/puppetlabs/code/environments/production/
> modules/mcollective/manifests/agents.pp:12
>
> There is no agents.pp file on my systems.
>
> This is an empty directory:
>
> /etc/puppetlabs/code/environments/production/modules/
>
> Anyone know how to recover from this?  I'm in the process of trying to
> provision a ol6 box and can't.
>
> Thanks,
>
> Kenton Brede
>
>
>
>
>

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


[Puppet Users] Puppet upgrade broke puppet agent on my Oracle Linux 5 and 6 boxes

2017-02-02 Thread Kenton Brede
On ol7 boxes the puppet agent is working fine.

This is what I have installed on one of my ol6 boxes:

# rpm -qa |grep puppet
mcollective-puppet-common-1.11.1-1.el6.noarch
puppetlabs-release-22.0-2.noarch
puppetlabs-release-pc1-1.1.0-5.el6.noarch
mcollective-puppet-agent-1.11.1-1.el6.noarch
puppet-agent-1.9.0-1.el6.x86_64

This is the error I'm getting:

Error: Failed to apply catalog: Could not find dependent
Service[mcollective] for
File[/usr/libexec/mcollective/mcollective/agent/shell.ddl] at
/etc/puppetlabs/code/environments/production/modules/mcollective/manifests/agents.pp:12

There is no agents.pp file on my systems.

This is an empty directory:

/etc/puppetlabs/code/environments/production/modules/

Anyone know how to recover from this?  I'm in the process of trying to
provision a ol6 box and can't.

Thanks,

Kenton Brede

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


Re: [Puppet Users] puppetlabs-release not signed

2016-04-20 Thread Kenton Brede
I'm getting the same for:

Package puppetlabs-release-5-12.noarch.rpm is not signed
Package puppetlabs-release-6-12.noarch.rpm is not signed
Package puppetlabs-release-7-12.noarch.rpm is not signed



Kenton Brede





On Wed, Apr 20, 2016 at 4:11 AM, Jonathan Gazeley <
jonathan.gaze...@bristol.ac.uk> wrote:

> This morning I noticed on yum.puppetlabs.com that
> puppetlabs-release-6-12.noarch.rpm and puppetlabs-release-7-12.noarch.rpm
> are not signed (possibly others too, I didn't check). My yum cron job is
> bitching about it because I don't allow unsigned packages.
>
> Is this a mistake?
>
> Thanks,
> Jonathan
>
> --
> Jonathan Gazeley
> Senior Systems Administrator
> IT Services
> University of Bristol
>
> --
> 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/571747B7.1020908%40bristol.ac.uk
> .
> 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/CA%2BnSE39-n7krpKMxQ8Bxi6pF_EhPz%3DwG2X3ba%2BLe7dZDbhgYXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] maestrodev/wget + owner + group + mode

2016-03-10 Thread Kenton Brede
You change the "mode" to the permissions you want.  What perms do you want?
Kent

Kenton Brede





On Thu, Mar 10, 2016 at 1:01 PM, Vicente Zepeda <chente@gmail.com>
wrote:

> Hello, I'm new to puppet, I'm using maestrodev/wget to get some file to a
> folder I created.
>
> file { $_some_path:
>   ensure  => directory,
>   owner   => $_some_owner,
>   group   => $_some_group,
>   mode=> '0644'
> }
>
>
> After I generate the directory y do this
>
> wget::fetch {"${source}/file.txt":
>   destination => "${_some_path}/",
>   user=> "${source_user}",
>   password=> "${source_password}",
>   timeout => 0,
>   verbose => false,
> }
>
> When I go to see the permissions on the files I have this
>
> drwxr-xr-x 2 user1 user1 4096 Mar 10 18:44 .
> drwxr-xr-x 3 user1 user1 4096 Mar 10 18:44 ..
> -rw-r--r-- 1 root  root 4562 Mar 10 17:15 file.txt
>
> Does anyone know how to set the right permission to the downloaded file.
>
> Thanks.
>
>
>
>
>
>
>
>
>
> --
> 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/f862a2bc-932e-4134-9087-dd03dcb3f79b%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/f862a2bc-932e-4134-9087-dd03dcb3f79b%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [Puppet Users] mcollective modules for puppet4

2016-03-05 Thread Kenton Brede
I'm assuming you're talking about Mcollective plugins...

You can actually use the older puppetlabs repo to install these.  In other
words you can have both the regular and the pc1 repos working at the same
time.  I've had no issues doing so.  There was one plugin that wasn't
included in the repo and I stuck the files into Puppet and distributed them
to the correct directories.

Plugins are here:

https://github.com/puppetlabs?utf8=%E2%9C%93=mcollective-

Install guide is here:

https://docs.puppetlabs.com/mcollective/deploy/plugins.html

hth,
Kent

Kenton Brede





On Fri, Mar 4, 2016 at 4:41 PM, <zdehn...@enphaseenergy.com> wrote:

> Does anyone have any examples of how to install the mcollective modules in
> a puppet4 environment?
>
> The yum repos for pc1 do not have the mcollective modules in the repo's
> path.  They are there, but to get them you need to navigate there with a
> browser and download them manually, and the rpm's don't install one the
> correct locations for puppet4.
>
> The few modules I have seen also want to install them in pre-puppet4
> locations, and they want to ensure that mcollective-client, etc. is
> installed as opposed to puppet-agent.
>
> It took me a long time to map the documented installation instructions for
> mcollective into a working puppet4 install, and I really want to add the
> file manager, iptables, and package functionality to mcollective, but I'm
> can't tell if what is available now will even work under puppet4, if I can
> manage to massage things into the correct locations.
>
>  Thanks,
> James "Zeke" Dehnert
>
> --
> mailto:zdehn...@enphase.com  James "Zeke" Dehnert
>   -= Eschew Obfuscation =-
>  "Life is racing. Everything else is just waiting"
>
> --
> 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/212787f9-fc15-406a-abce-18d09b3ddc3b%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/212787f9-fc15-406a-abce-18d09b3ddc3b%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [Puppet Users] Recommended way to get mcollective working with PC1

2016-01-15 Thread Kenton Brede
That does indeed work. :)

Playing around this morning I also found that I could get a working
configuration starting with:

puppetserver gem install jruby-activemq

But using the older Puppet repo makes for a cleaner install.

Thanks Stefan,

Kent



On Fri, Jan 15, 2016 at 10:31 AM, Stefan Heijmans 
wrote:

> Hi,
>
> See the comment Jo made here [1], activemq and plugins will work.
>
> [1] https://tickets.puppetlabs.com/browse/MCO-722
>
> Stefan
>
> --
> 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/e4e226a4-d611-4918-a475-5925b48474be%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kent Brede

-- 
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%2BnSE3_H%2BnAYR%3Da5Y5cYZg1vcXrp7nGP8%3DHCLdCN0gBjxz65nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Recommended way to get mcollective working with PC1

2016-01-14 Thread Kenton Brede
It doesn't look like PC1 includes middleware for mcollective.  I'm not
finding documentation specifically for mcollective and PC1.

Is activemq still the preferred middleware?

If so, should I install the activemq (0.0.1) gem or the jruby-activemq gem
(5.5.1)?

How can I get the puppetmaster to see activemq if its installed outside the
PC1 environment?

Thanks,

-- 
Kent Brede

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


Re: [Puppet Users] 'puppetmaster gem install activemq' issue

2015-12-21 Thread Kenton Brede
Thanks for the response.  Just getting back to this.

I'm trying to install activemq in order to use mcollective, since activemq
is not part of pc1.  It used to be in the puppetlabs repo but dropped in
the puppetlabs-pc1 repo.  I'm not finding instructions on how to install
activemq with pc1.  A couple months or so ago I installed pc1 and IIRC I
used "puppetserver gem install activemq" to install and it worked fine.
Perhaps on that text box I had installed the appropriate development
packages and that's all I need to do.  Unfortunately I deleted the test
VM.

I didn't realize there was a java and a 'C' version of activemq.  What's
the name of the java version of activemq and how does one go about
installing it for pc1?

Thanks,
Kent

On Fri, Dec 11, 2015 at 5:28 PM, Matthaus Owens <matth...@puppetlabs.com>
wrote:

> Kenton,
> It looks like you're trying to install the activemq gem, which is a
> c++ rubygem. It also depends on other compiled rubygems.
> Puppetserver's gem command does not support installing native C and
> C++ based rubygems[1]. It might help if you explain a little more
> about what you're trying to do, as generally people are interested in
> the activemq java package and not the activemq rubygem.
>
> [1] -
> https://docs.puppetlabs.com/puppetserver/latest/gems.html#gems-with-native-c-extensions
>
> On Fri, Dec 11, 2015 at 2:01 PM, Kenton Brede <kbr...@gmail.com> wrote:
> > Trying to install activemq on an Oracle Linux 7.2 box.  Using
> > puppetlabs-release-pc1-1.0.0-1 which has puppetserver version 2.2.1.
> >
> > Below is the command I ran and the resulting error message.  I'm not a
> java
> > guy.  Any advice appreciated. -- Thanks.
> >
> > [puppet ~]# puppetserver gem install activemq
> > Building native extensions.  This could take a while...
> > ERROR:  Error installing activemq:
> > ERROR: Failed to build gem native extension.
> >
> > java -jar
> > /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar -r
> > ./siteconf20151211-4760-1jn5vxr.rb extconf.rb
> >
> >
> > Error(s) occurred while parsing command-line arguments: Unknown option:
> "-r"
> >
> >   -d, --debug   Turns on debug mode
> >   -b, --bootstrap-config BOOTSTRAP-CONFIG-FILE  Path to bootstrap config
> > file
> >   -c, --config CONFIG-PATH  Path to a configuration
> file
> > or directory of configuration files, or a comma-separated list of such
> > paths.See the documentation for a list of supported file types.
> >   -p, --plugins PLUGINS-DIRECTORY   Path to directory plugin
> > .jars
> >   -h, --helpShow help
> >
> > extconf failed, uncaught signal 1
> >
> > Gem files will remain installed in
> > /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/rice-2.0.0 for
> > inspection.
> > Results logged to
> >
> /opt/puppetlabs/server/data/puppetserver/jruby-gems/extensions/universal-java-1.8/1.9/rice-2.0.0/gem_make.out
> >
> > --
> > Kent Brede
> >
> >
> >
> >
> > --
> > 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%2BnSE3_swJbORKmgjXMxsMbSUx%2BFFSNCLJjSE1b4S%3D1_CofyYw%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Matthaus Owens
> Puppet Labs
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CACD%3DwAepohoT%2BzLaoNmMRg4MKf9MnA2uX%3DvTnNHnwEntSErcrg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kent Brede

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


[Puppet Users] 'puppetmaster gem install activemq' issue

2015-12-11 Thread Kenton Brede
Trying to install activemq on an Oracle Linux 7.2 box.  Using
puppetlabs-release-pc1-1.0.0-1 which has puppetserver version 2.2.1.

Below is the command I ran and the resulting error message.  I'm not a java
guy.  Any advice appreciated. -- Thanks.

[puppet ~]# puppetserver gem install activemq
Building native extensions.  This could take a while...
ERROR:  Error installing activemq:
ERROR: Failed to build gem native extension.

java -jar
/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar -r
./siteconf20151211-4760-1jn5vxr.rb extconf.rb


Error(s) occurred while parsing command-line arguments: Unknown option: "-r"

  -d, --debug   Turns on debug mode
  -b, --bootstrap-config BOOTSTRAP-CONFIG-FILE  Path to bootstrap config
file
  -c, --config CONFIG-PATH  Path to a configuration
file or directory of configuration files, or a comma-separated list of such
paths.See the documentation for a list of supported file types.
  -p, --plugins PLUGINS-DIRECTORY   Path to directory plugin
.jars
  -h, --helpShow help

extconf failed, uncaught signal 1

Gem files will remain installed in
/opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/rice-2.0.0 for
inspection.
Results logged to
/opt/puppetlabs/server/data/puppetserver/jruby-gems/extensions/universal-java-1.8/1.9/rice-2.0.0/gem_make.out

-- 
Kent Brede

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


Re: [Puppet Users] Status of activemq

2015-09-22 Thread Kenton Brede
I'm wondering the same thing here.

Kent

On Wed, Jul 22, 2015 at 6:28 PM, Ellison Marks  wrote:

> So, I'm going through the dance of upgrading to puppet 4.2 from 3.8 on
> CentOS 6, and I've run into a few things that brought up some questions.
> During the install, I ran into a number of collisions and incompatibilities
> between pc1 and the existing packages, but pertinent to this issue, I had
> to uninstall the old puppetlabs-release package in favor of the pc1 release
> package, as they were both claiming ownership of the signing key. It's
> mostly worked out, however, now I'm at the point where I'm working on
> migrating mcollective. Aside from some hiccups with involving
> incompatibilities with the new facter, I've got things talking to each
> other. Now though, I'm wondering about activemq. I've still got the version
> I had installed from the puppetlabs-deps repo, and it's working, I'm just
> not sure where I'm supposed to get updates at this point.
>
> --
> 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/16492e87-eb64-45a1-9dc5-6d861560fafd%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kent Brede

-- 
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%2BnSE39RGuhWuUzcwdbq%2BNTYSZ7PdcVvURY2jzGqBC%3DJ_vmf%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Anyone successfully use mcollective shell plugin with RHEL 5 & 6?

2015-09-22 Thread Kenton Brede
The title pretty much says it all.  I mostly manage RHEL 5 & 6 boxes that
come with ruby 1.8.7.  The mcollective shell plugin requires ruby 1.9.

SCL might work for the RHEL 6 systems but not 5.  Building everything from
source would work but certainly not ideal.  I took a stab at managing ruby
with rbenv yesterday and didn't manage to get the shell plugin to work.

Any thoughts appreciated.

Thanks,

-- 
Kent Brede

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


[Puppet Users] How do you keep hostnames out of the manifest?

2014-11-03 Thread Kenton Brede
We're a small organization and all my servers are pets.  I've made an
effort to keep site specific data out of the manifest, but I haven't been
able to completely.
Hiera has been a big help in getting us most of the way.

Is it even possible to have a clean manifest, when a person has pets to
mange?

I'm still ending up with hostnames as variables in erb files, assigning
classes like files::servername and something like the following:

  # manage index.html
  file { '/var/www/html/index.html':
owner   = apache,
group   = apache,
mode= '0640',
source  = $::hostname ? {
  default   = undef,
  $::hostname   = puppet:///modules/httpd/${::hostname}.index.html,
}
  }

Any advice is appreciated.
Thanks,

-- 
Kent Brede

-- 
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%2BnSE3829QU-tfnEcM3zcPg%2Bdyx268M4kkB4FqSf3Q%2BH6Hs%2B%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Augeas and idempotency

2014-10-20 Thread Kenton Brede
I'd like to add a this file managed by puppet line to the top of the
files I manage with augeas.

This works but is not idempotent.  I could add an onlyif but then if I want
to change SELINUX to off I won't be able to, since the comment will
always exist.

augeas { 'selinux_config':
  context = '/files/etc/selinux/config',
  changes = [
'ins #comment before #comment[1]',
'set #comment[1] TEST',
'set SELINUX on',
  ],
}


I I tried the following but get error Error:
/Stage[main]/Test_module/Augeas[selinux_config]: Could not evaluate: Saving
failed, see debug

If I remove the 'ins' line the comment is added and it's idempotent, but of
course the comment is at the bottom of the file.

augeas { 'selinux_config':
  context = '/files/etc/selinux/config',
  changes = [
'ins #comment before #comment[1]',
'set #comment[. = TEST ] TEST',
'set SELINUX on',
  ],
}

Is there any way to get this to work or am I just beating my head against
the wall for nothing?
Thanks,

-- 
Kent Brede

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


Re: [Puppet Users] Augeas and idempotency

2014-10-20 Thread Kenton Brede
This is a proof of concept if you will.  Just using this as a simple
example.  I've got a lot of files I'd like to add a managed by Puppet
header to.

There's two camps.  Manage the whole file or edit in place.  I realize
Puppet users are mostly of the former.  I'm of the latter.
Thanks,
Kent

On Mon, Oct 20, 2014 at 3:37 PM, Trevor Vaughan tvaug...@onyxpoint.com
wrote:

 Being a file with only two options, do you need to use Augeas? Why not
 just manage the whole file?

 The only time you wouldn't do this is if you expect someone to
 independently change variables in the file either by hand or with another
 tool later and you do not want to change them back.

 Trevor

 On Mon, Oct 20, 2014 at 11:26 AM, Kenton Brede kbr...@gmail.com wrote:

 I'd like to add a this file managed by puppet line to the top of the
 files I manage with augeas.

 This works but is not idempotent.  I could add an onlyif but then if I
 want to change SELINUX to off I won't be able to, since the comment will
 always exist.

 augeas { 'selinux_config':
   context = '/files/etc/selinux/config',
   changes = [
 'ins #comment before #comment[1]',
 'set #comment[1] TEST',
 'set SELINUX on',
   ],
 }


 I I tried the following but get error Error:
 /Stage[main]/Test_module/Augeas[selinux_config]: Could not evaluate: Saving
 failed, see debug

 If I remove the 'ins' line the comment is added and it's idempotent, but
 of course the comment is at the bottom of the file.

 augeas { 'selinux_config':
   context = '/files/etc/selinux/config',
   changes = [
 'ins #comment before #comment[1]',
 'set #comment[. = TEST ] TEST',
 'set SELINUX on',
   ],
 }

 Is there any way to get this to work or am I just beating my head against
 the wall for nothing?
 Thanks,

 --
 Kent Brede

  --
 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%2BnSE3904TTdfbuwBNpkykUtLEBY01201h7aTNWGkWYLYg34NQ%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CA%2BnSE3904TTdfbuwBNpkykUtLEBY01201h7aTNWGkWYLYg34NQ%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




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

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

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




-- 
Kent Brede

-- 
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%2BnSE39OgGKh4myQKA-KE%2BB7NASTjjnyZmY5o4YW-PifVa%2BFXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Getting the last of site specific data out of manifest

2014-10-16 Thread Kenton Brede
I'm using OS Puppet 3.7.1.  I'm using Hiera and *mostly* have our site
specific data out of our modules.

I could use some advice on how to handle the following two cases.

Case #1

node basenode {
  include files   # files common to all nodes
}

node 'hostname.example.com' inherits basenode {
  include files::hostname  # files specific to host
}

Case #2

In template files, flow control like:

% if (hostname == hostname1) -%
X11Forwarding yes
% else -%
X11Forwarding no
% end -%

Any advice appreciated.

Thanks,

-- 
Kent Brede

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


Re: [Puppet Users] File_line match

2014-05-14 Thread Kenton Brede
I tested this and the match is working OK.  What I got from what you posted
is the following:

Error: Failed to apply catalog: Validation of File_line[password policy
change] failed: When providing a 'match' parameter, the value must be a
regex that matches against the value of your 'line' parameter at
/etc/puppet/modules/test_module/manifests/init.pp:14
Wrapped exception:
When providing a 'match' parameter, the value must be a regex that matches
against the value of your 'line' parameter

Once I took the line break out of the line  = you posted, the change
worked fine.

line = 'passwordrequisitepam_cracklib.so retry=3
minlen=8 difok=5 dcredit=-1 lcredit=-1 ucredit=-1 ocredit=-1'


Kent


On Wed, May 14, 2014 at 1:34 AM, eliran shlomo eliranshl...@gmail.comwrote:

 Hi,
 I'm trying to replace line inside a file with file_line.

  file_line { 'password policy change':
 ensure = present,
 path= '/tmp/test',
 match = 'password.*requisite.*cracklib\.so.*',
 line = 'passwordrequisite
   pam_cracklib.so retry=3 minlen=8 difok=5 dcredit=-1 lcredit=-1
 ucredit=-1 ocredit=-1'
  }

 but it keeping failing
 Error: Failed to apply catalog: Validation of File_line[password policy
 change] failed: When providing a 'match' parameter, the value must be a
 regex that matches against the value of your 'line' parameter at
 /etc/puppet/environments/common/pci/manifests/init.pp:20

 Please advice.



 --
 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/ad28d01f-fabc-4fc1-aa80-795bb1579a4e%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/ad28d01f-fabc-4fc1-aa80-795bb1579a4e%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

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


Re: [Puppet Users] augeas for setting URIEncoding variable in tomcat, server.xml file.

2014-05-08 Thread Kenton Brede
Try something like this:

augeas { 'update_server.xml':
  lens= 'Xml.lns',
  context   =
'/files/opt/apphome/apache-tomcat-7.0.53/conf/server.xml/Server/Service/Connector[*]/#attribute/',

  incl = /opt/apphome/apache-tomcat-7.0.53/conf/server.xml,
  changes = ['ins URIEncoding after port[. = 8080]',
   'set URIEncoding UTF-8',
  ],
}

The context is actually the path as augeas sees it.  I wildcarded
Connector because there can be more than one.  For example Connector[1]
and Connector[2].

For changes its actually doing this:

Insert URIEncoding after, Connector with port=8080, and set URIEncoding
to UTF-8.

It helps to use augtool if you haven't.  Try something like:

$ augtool --transform Xml.lns incl
/opt/apphome/apache-tomcat-7.0.53/conf/server.xml
augtool print /files/opt/apphome/apache-tomcat-7.0.53/conf/server.xml
augtool print
/files/opt/apphome/apache-tomcat-7.0.53/conf/server.xml/Server/Service/Connector[*]

Kent




On Wed, May 7, 2014 at 3:40 PM, Pradeep Reddy pradeep.nars...@gmail.comwrote:

 Hi Team,

 I am using below info in my manifest.  URIEncoding=UTF-8 is not present
 in server.xml.  Trying to inject URIEncoding using below augeas syntax.

  augeas { 'update_server.xml':
 lens= 'Xml.lns',
 incl =
 /opt/apphome/apache-tomcat-7.0.53/conf/server.xml,
 context=
 '/opt/apphome/apache-tomcat-7.0.53/conf/server.xml'/Connector port=8080',
 changes   = flatten([
   set
 Server/Service/Connector[1][#attribute/redirectport='8443']/#attribute/URIEncoding
 UTF-8,]),
   }

 After executing getting below information.  URIEncoding=UTF-8 is not
 getting appended in server.xml.

 Could someone please check and let me know, wehther i am using a wrong
 syntax.


 Debug: Augeas[update_server.xml](provider=augeas): Opening augeas with
 root /, lens path , flags 64
 Debug: Augeas[update_server.xml](provider=augeas): Augeas version 1.0.0 is
 installed
 Debug: Augeas[update_server.xml](provider=augeas): Will attempt to save
 and only run if files changed
 Debug: Augeas[update_server.xml](provider=augeas): sending command 'set'
 with params
 [\${brand::tomcat_installdir}/${brand::tomcat_version}/conf/server.xml\/Connector
 port=\8080\/Server/Service/Connector[1][#attribute/redirectport='8443']/#attribute/URIEncoding,
 UTF-8]
 Debug: Augeas[update_server.xml](provider=augeas): Skipping because no
 files were changed
 Debug: Augeas[update_server.xml](provider=augeas): Closed the augeas
 connection

 Regards,
 Pradeeo.

  --
 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/6a327ad9-347a-493a-b32a-89b46645e22b%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/6a327ad9-347a-493a-b32a-89b46645e22b%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE3-%3D_xA2eP65yy95o2%3DZGEkH4ZhSj%3DhhUUWb%3Dvm5wMNpww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] augeas for setting URIEncoding variable in tomcat, server.xml file.

2014-05-08 Thread Kenton Brede
And that's not going to work so hot because you're going to keep getting
this on every run:

Error: /Stage[main]/Test_module/Augeas[update_server.xml]: Could not
evaluate: Saving failed, see debug

To avoid this you can use an onlyif.

onlyif  = 'match URIEncoding[. = UTF-8] size == 0',

This will match any URIEncoding=UTF-8 in any Connector section.  So it
won't work properly if you already have URIEncoding=UTF-8 defined for
another Connector.

What a person needs to do is match port=8080 and URIEncoding=UTF-8.
But I'm pressed for time and need to get going.

Hopefully this will get you down the road a bit further.  Someone else may
chime in here with a better solution.
Kent


On Thu, May 8, 2014 at 11:29 AM, Pradeep Reddy pradeep.nars...@gmail.comwrote:

 Thx Kent.
  On 8 May 2014 18:25, Kenton Brede kbr...@gmail.com wrote:

 Try something like this:

 augeas { 'update_server.xml':
   lens= 'Xml.lns',
   context   =
 '/files/opt/apphome/apache-tomcat-7.0.53/conf/server.xml/Server/Service/Connector[*]/#attribute/',

   incl = /opt/apphome/apache-tomcat-7.0.53/conf/server.xml,
   changes = ['ins URIEncoding after port[. = 8080]',
'set URIEncoding UTF-8',
   ],
 }

 The context is actually the path as augeas sees it.  I wildcarded
 Connector because there can be more than one.  For example Connector[1]
 and Connector[2].

 For changes its actually doing this:

 Insert URIEncoding after, Connector with port=8080, and set
 URIEncoding to UTF-8.

 It helps to use augtool if you haven't.  Try something like:

 $ augtool --transform Xml.lns incl
 /opt/apphome/apache-tomcat-7.0.53/conf/server.xml
 augtool print /files/opt/apphome/apache-tomcat-7.0.53/conf/server.xml
 augtool print
 /files/opt/apphome/apache-tomcat-7.0.53/conf/server.xml/Server/Service/Connector[*]

 Kent




 On Wed, May 7, 2014 at 3:40 PM, Pradeep Reddy 
 pradeep.nars...@gmail.comwrote:

 Hi Team,

 I am using below info in my manifest.  URIEncoding=UTF-8 is not
 present in server.xml.  Trying to inject URIEncoding using below augeas
 syntax.

  augeas { 'update_server.xml':
 lens= 'Xml.lns',
 incl =
 /opt/apphome/apache-tomcat-7.0.53/conf/server.xml,
 context=
 '/opt/apphome/apache-tomcat-7.0.53/conf/server.xml'/Connector port=8080',
 changes   = flatten([
   set
 Server/Service/Connector[1][#attribute/redirectport='8443']/#attribute/URIEncoding
 UTF-8,]),
   }

 After executing getting below information.  URIEncoding=UTF-8 is not
 getting appended in server.xml.

 Could someone please check and let me know, wehther i am using a wrong
 syntax.


 Debug: Augeas[update_server.xml](provider=augeas): Opening augeas with
 root /, lens path , flags 64
 Debug: Augeas[update_server.xml](provider=augeas): Augeas version 1.0.0
 is installed
 Debug: Augeas[update_server.xml](provider=augeas): Will attempt to save
 and only run if files changed
 Debug: Augeas[update_server.xml](provider=augeas): sending command 'set'
 with params
 [\${brand::tomcat_installdir}/${brand::tomcat_version}/conf/server.xml\/Connector
 port=\8080\/Server/Service/Connector[1][#attribute/redirectport='8443']/#attribute/URIEncoding,
 UTF-8]
 Debug: Augeas[update_server.xml](provider=augeas): Skipping because no
 files were changed
 Debug: Augeas[update_server.xml](provider=augeas): Closed the augeas
 connection

 Regards,
 Pradeeo.

  --
 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/6a327ad9-347a-493a-b32a-89b46645e22b%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/6a327ad9-347a-493a-b32a-89b46645e22b%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




 --
 Kent Brede




  --
 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/9h5JjWZpOYM/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/CA%2BnSE3-%3D_xA2eP65yy95o2%3DZGEkH4ZhSj%3DhhUUWb%3Dvm5wMNpww%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CA%2BnSE3-%3D_xA2eP65yy95o2%3DZGEkH4ZhSj%3DhhUUWb%3Dvm5wMNpww%40mail.gmail.com?utm_medium=emailutm_source=footer
 .

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

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

Re: [Puppet Users] Re: Setting quotes using augeas type

2014-05-06 Thread Kenton Brede
That's one combination I hadn't tried but it works!
Thanks,
Kent


On Tue, May 6, 2014 at 4:52 AM, zerozerouno...@gmail.com wrote:

 On Wednesday, April 30, 2014 11:21:47 PM UTC+2, kbrede wrote:

 But when using the augeas type with the following:
 changes = 'set \$database_password \test\',

 The file entry looks like:
 $database_password = \test\;


 Try this (pay attention to what is a single quote and what is a double!):

 changes = 'set \$database_password \'test\'',

 Marco

 --
 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/f1b5d685-0549-4660-b098-25af0b52441a%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/f1b5d685-0549-4660-b098-25af0b52441a%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE38iQnzNOMQ7CaYW%3D7YMxo%2B8dzYjDWvJp7Bp5ktvy%3DO6aA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Augeas Question

2014-04-28 Thread Kenton Brede
Not ab augeas expert but IIRC what I did in a similar situation is force
puppet/augeas to point to only one file.

Try adding context, incl, and lens to your augeas definition, like
the example below.  By specifying the lens, I think it helps speed up the
augeas type also.  At least I read that somewhere.  :)

  augeas { 'selinux_config':
context = '/files/etc/selinux/config',
incl= '/etc/selinux/config',
lens= 'Shellvars.lns',
changes = set SELINUX ${selinux_state},
  }

If I need to customize a lens, I stick it in /usr/share/augeas/lenses and
manage it with puppet.  I leave the lenses in /dist/ alone.
Kent


On Mon, Apr 28, 2014 at 2:56 PM, Pete Hartman pete.hart...@gmail.comwrote:

 I hope this is an appropriate place for this question; if not, any
 redirection to a more appropriate place is appreciated.

 So: I'm trying to set up puppet + augeas on an opensolaris system.  There
 are certain files I have that are under RCS version control--this is not
 all my doing, so some of these things I cannot change.  This creates files
 under /etc/ that are like filename,v.

 I'm using puppet 2.7.22 and augeas 1.0.0.

 Well, augtool, and apparently augeas invoked via puppet throw up on this.
  Augtool reports

 Failed to initialize Augeas
 error: Invalid path expression
 error: garbage at end of path expression
 /augeas/files/etc/default/nfs|=|,v

 I just want augeas to ignore these files...

 I think the answer is to modify the
 /usr/local/share/augeas/lenses/dist/*.aug files that refer to things that
 are causing this grief and add excl clauses to explicitly exclude anything
 *,v.

 For example in shellvars.aug we have

 let filter_default = incl /etc/default/*
 . excl /etc/default/grub_installdevice*
 . excl /etc/default/whoopsie

 I've added
 . excl /etc/default/*,v

 This appears to work.  But I'm not sure this is the right solution --
 should I perhaps be making a copy of this to somewhere else and override
 the dist version?  Is there a more global way I could say ignore all files
 that have ,v after them ?

 Thanks

 Pete

 --
 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/017535fd-ff18-48e5-83eb-50d5f35b1a9e%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/017535fd-ff18-48e5-83eb-50d5f35b1a9e%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

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


Re: [Puppet Users] Best way to manage auth.conf

2014-04-25 Thread Kenton Brede
There's an augeas lens that works with auth.conf, puppet_auth.aug.  Would
using the augeas type work for you?

http://docs.puppetlabs.com/references/latest/type.html#augeas

Kent


On Tue, Apr 22, 2014 at 1:45 PM, Benjamin72 benjamin.jouy...@gmail.comwrote:

 Hi,

 I would like to manage *auth.conf* file of puppet clients to be able to
 use puppet kick.

 I tried this module : https://github.com/puppetlabs/puppetlabs-auth_confbut 
 encountered problems with checksum of the file.

 I also see this possibility :
 https://forge.puppetlabs.com/domcleal/augeasproviders

 Are there any other modules or solutions to do that ?

 Benjamin

 [Puppet 3.5.1]


  --
 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/65dd9c44-72a4-400b-ba4e-a83ed8b5da86%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/65dd9c44-72a4-400b-ba4e-a83ed8b5da86%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE3-WvwAApp%2BzhTFBoTy42hqXXPZN1do-e-gpvOJxxZ4G6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-25 Thread Kenton Brede
If the end game is allowing users to add to a Puppet controlled file,
perhaps you can use concat, similar to the class motd example on this
page:

https://github.com/puppetlabs/puppetlabs-concat

Kent



On Thu, Apr 24, 2014 at 8:33 AM, Paul Tötterman paul.totter...@gmail.comwrote:

 Hi,

 I'm managing workstations using puppet, and I was wondering if there's a
 better way to do this:

 $dir = inline_template('%=ENV[HOME]%')

 define customizable_file($source=undef,$template=undef,$replacemd5='') {
 $tmplname = $template ? {
 undef   = $name.common,
 default = $template,
 }
 file { $tmplname:
 source = $source,
 }
 exec { cp $tmplname $name:
 onlyif  = test ! -e $name -o \$(md5sum $name|cut -d' ' -f1)\
 = \$replacemd5\,
 path= ['/bin', '/usr/bin'],
 require = File[$tmplname],
 }
 }
 customizable_file { $dir/foo-$::hostname:
 source = 'file:///etc/motd',
 template   = $dir/foo-common,
 replacemd5 = 'e43e23c6d9a376bedd1ae405be4fdf97',
 }


 What I want to achieve is a file that is managed by puppet, but if the
 user touches it, puppet stops touching the file. Normal file resource with
 replace doesn't cut it in this case. replacemd5 should be set to the md5
 sum of the previous version of the file. I'd really like to see a custom
 type for this, that would handle templating some nice way, or at least
 allow one to specify more that one md5sum of previous versions. Obviously
 this doesn't work well for files that change often.

 So, is there a better way?

 Cheers,
 Paul

 PS. $dir is set to home so that you can dump the contents to a file and
 puppet apply it to test.

 --
 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/a5a6e496-5853-4a47-a7fb-14ab5f6c1f4e%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/a5a6e496-5853-4a47-a7fb-14ab5f6c1f4e%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE3__yv13Szcc-H2ZvRMkWrmDJBV92T1oy%3DfJpw8n3Sj-bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] augeas with puppet : cannot update line

2014-04-23 Thread Kenton Brede
First, it looks to me like you have a typo.  I don't have a my.cnf handy
ATM but I'd think setbind-adress should be setbind-address.

Second, do you have augeas-libs installed on your target system?  The
system you wish the changes to be made need
/usr/share/augeas/lenses/dist/* in place.

I successfully executed your enable-ip-forwarding augeas type and it
works fine.

Kent


On Tue, Apr 22, 2014 at 11:31 AM, cheniour ghassen ghacheni...@gmail.comwrote:

 Hi everyone,
 I am new in puppet. In fact i am trying to update bind-address in the
 mysql file '/etc/mysql/my.cnf
 i wrote the this code in manifests/nodes.pp


 augeas {  'update-bind-address':
 context   = '/files/etc/mysql/my.cnf',
 changes = ['setbind-adress 192.168.80.135'],
 }


 when i tape the papply command :puppet ignore this code and do not
 compile it. I tried other examples by changing the files but puppet keeps
 ignoring them.
 The only example that works is this one

 augeas {  'enable-ip-forwarding':
   context   = '/files/etc/sysctl.conf',
   changes = ['set net.ipv4.ip_forward 1'],
 }


 I really don't know what is going on here. I have quite a while now.
 Any help would be apperciated.Thanks.

 sincerely,
 ghassen Cheniour

 --
 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/f335c2d7-b41f-4d65-9a83-0bdc65ac23dc%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/f335c2d7-b41f-4d65-9a83-0bdc65ac23dc%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE38S-LyfUUU%2B%3DfAm%2BRpEBX7tDRk83vS8fpbyzkRtR_BELA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Augeas lens to change an arbitrary line in a file?

2014-04-22 Thread Kenton Brede
I'm no expert with augeas but after looking at the gs_init.ps file, I don't
know of any current lens that could be easily modified to work with it.  I
agree with Mike, I'd either use file_line or an exec.

File_line is part of stdlib.  Click on the types tab on this page for an
example.

https://forge.puppetlabs.com/puppetlabs/stdlib

Kent


On Mon, Apr 21, 2014 at 11:32 PM, Mike Langhorst
mike.langho...@gmail.comwrote:

 There's also the file_line resource that's available with the std lib
 module, that might work for you as well.


 On Monday, April 21, 2014 3:25:13 PM UTC-7, Joachim Schrod wrote:

 Hi,

 I'm new to Puppet, and also new to Augeas.

 I want to change a line in a file. In particular, the file is
   /usr/share/ghostscript/${gs_version}/Resource/Init/gs_init.ps
 and the line is
   % /DEFAULTPAPERSIZE (a4) def
 that I want to change into
   /DEFAULTPAPERSIZE (a4) def

 Is Augeas the right tool for such a task? I looked through its
 available lenses, but there ain't no Postscript lens.

 Of course, the other approach would be to use an exec resource to
 change that line.

 What is best practice?

 Joachim

 --
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Joachim Schrod, Roedermark, Germany
 Email: jsc...@acm.org

  --
 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/6b6b743b-3a6b-45a0-bc40-eec291688374%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/6b6b743b-3a6b-45a0-bc40-eec291688374%40googlegroups.com?utm_medium=emailutm_source=footer
 .

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




-- 
Kent Brede

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


Re: [Puppet Users] How to check a text file for a certain line?

2014-04-21 Thread Kenton Brede
Click on the types tab on that page and you'll see the documentation for
file_line.
Kent


On Mon, Apr 21, 2014 at 5:53 PM, Andreas Ntaflos d...@pseudoterminal.orgwrote:

 On 2014-04-22 00:10, Joachim Schrod wrote:
  On 04/21/14 19:42, Kenton Brede wrote:
  Look into using file_line, it's part of stdlib.
 
  https://forge.puppetlabs.com/puppetlabs/stdlib
 
  Hmm, I don't detect any documentation of file_line at that URL.
 
  Could you post another link with documentation?

 Funny that it doesn't seem to be mentioned in the README anymore, but
 here is the code and the documentation:


 https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/type/file_line.rb

 Andreas




-- 
Kent Brede

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


Re: [Puppet Users] yum install puppet vs gem install puppet on CentOS with Ruby 2.0. Gem works, not yum.

2014-04-18 Thread Kenton Brede
Puppet from the repo uses ruby 1.8.  Your ec2 instance is using ruby 2.0.

If you want to change which ruby version you're using on your ec2 servers,
you can run:

alternatives --config ruby

If ruby 1.8 isn't installed on your system, you'll need to install it
before you run the alternatives command. I probably didn't have to
mention that though. :)

Kent


On Fri, Apr 18, 2014 at 2:13 PM, Alexander Gray II gray...@gmail.comwrote:

 Hey guys,

 We have ruby 2.0.0 installed on a CentOS box.

 I installed puppet via yum install puppet:

 [root@ip-10-165-39-216 ec2-user]# yum list installed | grep puppet
 puppet.noarch 3.5.1-1.el6
 @puppetlabs-products
 But I get this error if I try to run puppet:

 [ec2-user@ip-10-165-39-216 ~]$ puppet --version
 /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in
 `require': cannot load such file -- puppet/util/command_line (LoadError)
 from
 /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in
 `require'
 from /usr/bin/puppet:3:in `main'

 So for giggles, I did a gem install puppet:

 And puppet works:

 [root@ip-10-165-39-216 ec2-user]# puppet --version
 3.5.1

 Why does gem install puppet work, but not yum install puppet?


 Thanks!

 --
 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/25d94a4e-4f6c-4a0d-9ea2-d868c6f1466f%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/25d94a4e-4f6c-4a0d-9ea2-d868c6f1466f%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE3-rQ6CVHL1F93kTJvV24x8Od-3NBaX-vhj34d-JWqdASg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] augeas, ntp.conf and iburst

2014-03-12 Thread Kenton Brede
I want to add a server on top of the stack in ntp.conf like:

server time.example.com iburst
server 0.rhel.pool.ntp.org iburst
...

I came up with this:

  augeas { 'ntp.conf':
context = '/files/etc/ntp.conf',
changes = [
  'ins server before server[1]',
  'set server[1] time.example.com' ,
],
onlyif  = 'match server[. = time.example.com] size == 0',
  }

This in fact adds time.example.com on top of 0.rhel.pool.ntp.org iburst
but excludes iburst at the end of the line.

server time.example.com
server 0.rhel.pool.ntp.org iburst
...

I tried 'set server[1] time.example.com iburst' but get error Could not
evaluate: Save failed with return code false.

augtool prints this:
/files/etc/ntp.conf/server[1] = 0.rhel.pool.ntp.org
/files/etc/ntp.conf/server[1]/iburst

So the iburst line doesn't really have a variable.

How do I append iburst at the end of time.example.com?

Thanks,

-- 
Kent

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


[Puppet Users] Replicating += with hiera

2014-03-12 Thread Kenton Brede
I'm in the process of moving to Puppet 3 and hiera.

With my old setup I placed users that were on all servers in basenode.
Then did a += for any additional users in the node definition.

node basenode {
  users = ['user1', 'user2']
}

node server.example.com inherits basenode {
  users += ['user3']
  # or simple exclude the line, if there were no additional users
}

With the new setup I've got a common.yaml that contains a hash of users
with access to all boxes.  Then I thought I'd place additional users for
server1 in server1.yaml.

common.yaml
users_common:
  user1:
ensure: present
home: /home/user1
..

server1.yaml
server1_users:
  user3:
ensure: present
home: /home/user3
..

Then I call like this, which just pulls the usernames from the hash and
creates home directories with a file type:

class users::ldap {
  # regular users
  $users_common = hiera('users_common')
  $users_common_keys = keys($users_common)
  $users_hosts = hiera(${::hostname}_users)
  $users_hosts_keys = keys($users_hosts)
  $adusers_combined = flatten([ $users_common_keys, $users_hosts_keys ])

  # create ldap user home directories
  users::admin_homedir_define { $adusers_combined: }
}

Works great until there are no users for ${::hostname}_users.

How can I make this work when ${::hostname}_users is empty?
Thanks,

-- 
Kent

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


Re: [Puppet Users] Replicating += with hiera

2014-03-12 Thread Kenton Brede
Thanks for the help all.  Maybe I'm approaching this in the wrong way but
the example puts all users on each box.  I'm trying to do something like:

users_common = admin1, admin2
server1 = users_common + user1
server2 = users_common
server3 = users_common + user1, user3

The goal is to not have to list the admin users in each host.yaml file, but
include them.

From what I gather hiera doesn't allow:

sever1.yaml
include users_common

server1_users:
  user1:
ensure: present
home: /home/user1

Thanks,
Kent






On Wed, Mar 12, 2014 at 12:38 PM, José Luis Ledesma 
joseluis.lede...@gmail.com wrote:


 El 12/03/2014 17:19, Jonathan Proulx j...@jonproulx.com escribió:

 
  see http://docs.puppetlabs.com/hiera/1/puppet.html
 
  If you need to merge arrays or merge hashes from multiple hierarchy
  levels, you will have to use the hiera_array or hiera_hash functions
  in the body of your classes.
 
  There's not really a good example in that page, but essentially where
  'hiera' takes the most specific patch hiera_array and heira_hash
  collect all the values across all matching hierarchies (though you
  needn't define the key in every level)
 

 +1 it should be something like

 common.yaml
 users:

   user1:
 ensure: present
 home: /home/user1
 ..

 server1.yaml

 users:
   user3:
 ensure: present
 home: /home/user3

 And then
 $users= hiera_hash('users')
 users::admin_homedir_define { $users: }

 Note: code not tested

 Regards

  we use this for packages to install:
 
$basepackages = hiera_array('basepackages')
ensure_packages($basepackages)
 
  Then in hiera be define (or not) arrays of packages by os version, role,
 etc...
 
  -Jon
 
  On Wed, Mar 12, 2014 at 12:11 PM, Kenton Brede kbr...@gmail.com wrote:
   I'm in the process of moving to Puppet 3 and hiera.
  
   With my old setup I placed users that were on all servers in basenode.
  Then
   did a += for any additional users in the node definition.
  
   node basenode {
 users = ['user1', 'user2']
   }
  
   node server.example.com inherits basenode {
 users += ['user3']
 # or simple exclude the line, if there were no additional users
   }
  
   With the new setup I've got a common.yaml that contains a hash of
 users with
   access to all boxes.  Then I thought I'd place additional users for
   server1 in server1.yaml.
  
   common.yaml
   users_common:
 user1:
   ensure: present
   home: /home/user1
   ..
  
   server1.yaml
   server1_users:
 user3:
   ensure: present
   home: /home/user3
   ..
  
   Then I call like this, which just pulls the usernames from the hash and
   creates home directories with a file type:
  
   class users::ldap {
 # regular users
 $users_common = hiera('users_common')
 $users_common_keys = keys($users_common)
 $users_hosts = hiera(${::hostname}_users)
 $users_hosts_keys = keys($users_hosts)
 $adusers_combined = flatten([ $users_common_keys, $users_hosts_keys
 ])
  
 # create ldap user home directories
 users::admin_homedir_define { $adusers_combined: }
   }
  
   Works great until there are no users for ${::hostname}_users.
  
   How can I make this work when ${::hostname}_users is empty?
   Thanks,
  
   --
   Kent
  
  
  
  
   --
   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%2BnSE3-%3D9zQvajiNMt9e%2BOA64fHrYwPkk4WEwhm0JBPHN598PA%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/CABZB-sgYSky1BzZ6Vf1OHuYonAhLh-gKV%2BN_RmiQreRyWbVk_w%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/CAF_B3dcgKzCVPdEBSjEQ5y6cMR0soodHcETwJOhZnSdW4QCrNQ%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CAF_B3dcgKzCVPdEBSjEQ5y6cMR0soodHcETwJOhZnSdW4QCrNQ%40mail.gmail.com?utm_medium=emailutm_source=footer
 .

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




-- 
Kent Brede

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

Re: [Puppet Users] Replicating += with hiera

2014-03-12 Thread Kenton Brede
Thanks all!  Hiera is smarter than I knew.  This is great. :)
Kent


On Wed, Mar 12, 2014 at 1:42 PM, José Luis Ledesma 
joseluis.lede...@gmail.com wrote:

 Try my code, its just what you want.
 El 12/03/2014 19:14, Kenton Brede kbr...@gmail.com escribió:

 Thanks for the help all.  Maybe I'm approaching this in the wrong way but
 the example puts all users on each box.  I'm trying to do something like:

 users_common = admin1, admin2
 server1 = users_common + user1
 server2 = users_common
 server3 = users_common + user1, user3

 The goal is to not have to list the admin users in each host.yaml file,
 but include them.

 From what I gather hiera doesn't allow:

 sever1.yaml
 include users_common

 server1_users:
   user1:
 ensure: present
 home: /home/user1

 Thanks,
 Kent






 On Wed, Mar 12, 2014 at 12:38 PM, José Luis Ledesma 
 joseluis.lede...@gmail.com wrote:


 El 12/03/2014 17:19, Jonathan Proulx j...@jonproulx.com escribió:

 
  see http://docs.puppetlabs.com/hiera/1/puppet.html
 
  If you need to merge arrays or merge hashes from multiple hierarchy
  levels, you will have to use the hiera_array or hiera_hash functions
  in the body of your classes.
 
  There's not really a good example in that page, but essentially where
  'hiera' takes the most specific patch hiera_array and heira_hash
  collect all the values across all matching hierarchies (though you
  needn't define the key in every level)
 

 +1 it should be something like

 common.yaml
 users:

   user1:
 ensure: present
 home: /home/user1
 ..

 server1.yaml

 users:
   user3:
 ensure: present
 home: /home/user3

 And then
 $users= hiera_hash('users')
 users::admin_homedir_define { $users: }

 Note: code not tested

 Regards

  we use this for packages to install:
 
$basepackages = hiera_array('basepackages')
ensure_packages($basepackages)
 
  Then in hiera be define (or not) arrays of packages by os version,
 role, etc...
 
  -Jon
 
  On Wed, Mar 12, 2014 at 12:11 PM, Kenton Brede kbr...@gmail.com
 wrote:
   I'm in the process of moving to Puppet 3 and hiera.
  
   With my old setup I placed users that were on all servers in
 basenode.  Then
   did a += for any additional users in the node definition.
  
   node basenode {
 users = ['user1', 'user2']
   }
  
   node server.example.com inherits basenode {
 users += ['user3']
 # or simple exclude the line, if there were no additional users
   }
  
   With the new setup I've got a common.yaml that contains a hash of
 users with
   access to all boxes.  Then I thought I'd place additional users for
   server1 in server1.yaml.
  
   common.yaml
   users_common:
 user1:
   ensure: present
   home: /home/user1
   ..
  
   server1.yaml
   server1_users:
 user3:
   ensure: present
   home: /home/user3
   ..
  
   Then I call like this, which just pulls the usernames from the hash
 and
   creates home directories with a file type:
  
   class users::ldap {
 # regular users
 $users_common = hiera('users_common')
 $users_common_keys = keys($users_common)
 $users_hosts = hiera(${::hostname}_users)
 $users_hosts_keys = keys($users_hosts)
 $adusers_combined = flatten([ $users_common_keys,
 $users_hosts_keys ])
  
 # create ldap user home directories
 users::admin_homedir_define { $adusers_combined: }
   }
  
   Works great until there are no users for ${::hostname}_users.
  
   How can I make this work when ${::hostname}_users is empty?
   Thanks,
  
   --
   Kent
  
  
  
  
   --
   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%2BnSE3-%3D9zQvajiNMt9e%2BOA64fHrYwPkk4WEwhm0JBPHN598PA%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/CABZB-sgYSky1BzZ6Vf1OHuYonAhLh-gKV%2BN_RmiQreRyWbVk_w%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/CAF_B3dcgKzCVPdEBSjEQ5y6cMR0soodHcETwJOhZnSdW4QCrNQ%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CAF_B3dcgKzCVPdEBSjEQ5y6cMR0soodHcETwJOhZnSdW4QCrNQ

Re: [Puppet Users] Cleaning up temp files with puppet

2014-03-12 Thread Kenton Brede
How about ending your script with a command that removes itself?

/bin/rm path_to_script
or
/bin/rm $0

Kent


On Tue, Mar 11, 2014 at 5:09 PM, nfwlpw nfw...@gmail.com wrote:

 So I have a puppet module, that gets a script from files/, runs that
 script, and after it's done, I'd like to remove it.

 Unfortunately puppet doesn't seem to like to have 2 different File
 resource aliased to the same, so I can't do

 file { myfile:
 ensure = present,
 source = puppet:///...,
 }

 file { remove myfile:
 path = myfile,
ensure = absent,
 }

 Puppet gave the error: err: Failed to apply catalog: Cannot alias
 File[remove myfile]...myfile already declared...

 The only work around I've found is using an exec resource.  Anyone know
 how to do this without exec?

 Thank you

  --
 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/d503ce3f-7678-4056-8386-b7eaaa02eb66%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/d503ce3f-7678-4056-8386-b7eaaa02eb66%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Kent Brede

-- 
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%2BnSE3_XR6nSYNCb%3Dgbq%3D%2BbMbDFveY5tg9VKbbUGYA%3DAf065cg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Have to run puppet agent twice to install LDAP and ssh keys.

2014-03-10 Thread Kenton Brede
OK, stages and chaining doesn't seem to work.  I'm running Puppet 3.4.3.

The following is executing in order but I still get fails on
Users::Admin_homedir_define and Ssh_authorized_key.

Class [ 'ldap_auth' ] - Exec | title == 'disable_selinux' | -
Users::Admin_homedir_define || - Ssh_authorized_key ||

Ldap_auth installs needed ldap packages, runs authconfig and takes care of
some config file changes.  LDAP auth should be configured and working just
after SELinux is disabled.  Users::Admin_homedir_define consists of a file
type and just creates home directories, /home/$name.

If I do a puppet agent -t --tags ldap_auth,files LDAP auth is
configured and works fine.

I did a tcpdump and discovered that there is no attempt to communicate with
the LDAP server during the run of puppet agent -t.  I'm not sure why.

I put a 60 second sleep between disable_selinux and Users::Admin_homedir.
I backgrounded puppet agent -t and verified LDAP auth was working.  Once
I fg the process, the file type fails, not able to find the user.

Info: /Stage[main]/Ldap_auth/Exec[added_lines_nslcd]: Scheduling refresh of
Service[nslcd]
Notice: /Stage[main]/Ldap_auth/Service[nslcd]: Triggered 'refresh' from 1
events
Notice: /Stage[main]/Files::Common/Exec[disable_selinux]/returns: executed
successfully
Error: Could not set 'directory' on ensure: Could not find user user1 at
9:/etc/puppet/modules/users/manifests/admin_homedir_define.pp
Error: Could not set 'directory' on ensure: Could not find user user1 at
9:/etc/puppet/modules/users/manifests/admin_homedir_define.pp
Wrapped exception:
Could not find user user1
Error:
/Stage[main]/Users::Ldap/Users::Admin_homedir_define[user1]/File[/home/user1]/ensure:
change from absent to directory failed: Could not set 'directory' on
ensure: Could not find user user1 at 9:/etc/puppet/modules/
users/manifests/admin_homedir_define.pp

Anyway.  I think I'm going to give up on this and just do a puppet agent
-t --tags ldap_auth  puppet agent -t for the first run on new boxes.
That works every time. :)

Thanks for looking into this.
Kent


On Mon, Mar 10, 2014 at 9:04 AM, Christopher Wood 
christopher_w...@pobox.com wrote:

 On Mon, Mar 10, 2014 at 06:35:12AM -0700, jcbollinger wrote:
 On Friday, March 7, 2014 11:38:20 AM UTC-6, Christopher Wood wrote:
 
   (inline)
 
   On Fri, Mar 07, 2014 at 09:39:44AM -0600, Kenton Brede wrote:
   I've got a module that installs and configures LDAP for user
   authentication.� I've got another module that creates user
   directories and
   another that assigns ssh keys.
   
   Using runstages I force the ldap module to run first and the
   user and
   ssh_keys modules to run last.
   LDAP is installed but the exec that creates user directories
 and
   the
   ssh_authorized_key type fail since they can't see the LDAP
 users.
   
   The reason being, I'm assuming, is because when the manifest is
   compiled,
   the LDAP users don't exist.� So ssh_authorized_key fails, even
 if
   the LDAP
   user information can be retrieved, by the time the ssh_keys
 module
   runs.
   
   Is there any way around this?
 
   Sounds like this somewhere top-scope:
 
   Class['ldap'] - User | |
 
   So your ldap class would have to be successfully managed before
 puppet
   tries to manage any users.
 
 That's what the OP attempts to do via run stages.  Inasmuch as I don't
 care much for run stages, though, I do prefer the suggested chaining
 approach.  Nevertheless, if run stages didn't work then chaining
 probably
 won't solve the problem either.

 Now there's a point. Back in the (2.6) day when I had puppet-managed
 resources in ldap users' home directories I didn't run into the above
 problem, but I had some require chaining going on.

 There could still be other things going on, like nscd caching a previous
 files lookup or the ldap configuration in question returning intermittent
 false results (timeout, load balancer choke, incorrect search filter). If I
 had my hands on this system I might check with tcpdump whether there are
 any ldap searches performed while puppet is attempting to manage
 user-dependent resources, which would give further hints where the issue
 might lie.

 I'm inclined to suspect a class containment failure; see
 [1]
 http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html
 for more information.  Upon further consideration, though, if it's a
 containment failure then chaining directly to a User| | collector
 might
 solve it after all.
 
 John
 
 --
 You received this message because you are subscribed to the Google
 Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it,
 send an
 email to [2]puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 [3]
 https

[Puppet Users] Have to run puppet agent twice to install LDAP and ssh keys.

2014-03-07 Thread Kenton Brede
I've got a module that installs and configures LDAP for user
authentication.  I've got another module that creates user directories and
another that assigns ssh keys.

Using runstages I force the ldap module to run first and the user and
ssh_keys modules to run last.

LDAP is installed but the exec that creates user directories and the
ssh_authorized_key type fail since they can't see the LDAP users.

The reason being, I'm assuming, is because when the manifest is compiled,
the LDAP users don't exist.  So ssh_authorized_key fails, even if the LDAP
user information can be retrieved, by the time the ssh_keys module runs.

Is there any way around this?

If I run the puppet agent twice, all is well.  It would just be nice to do
it in one run.

Thanks,

-- 
Kent

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


[Puppet Users] Possible to get just the keys out of a hiera hash?

2014-03-05 Thread Kenton Brede
So in hiera I've got:

users_common:
user1:
ensure: present
home: /home/user1
managehome: true
user2:
ensure: present
home: /home/user2
managehome: true

I'm using users_common with a create_resources in one class but I'd like
to just pull out user1, user2 into an array from users_common for a
different class.

Is this possible?

Something like:

$users_c = hiera('users_common')
$users = ${users_c['keys']}
notify { ${users}: }

Thanks,

-- 
Kent

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


Re: [Puppet Users] Possible to get just the keys out of a hiera hash?

2014-03-05 Thread Kenton Brede
Works great! -- Thanks.


On Wed, Mar 5, 2014 at 10:03 AM, Robin Bowes robin.bo...@yo61.com wrote:

 Have a look in stdlib for the keys function.

 R.


 On 5 March 2014 15:56, Kenton Brede kbr...@gmail.com wrote:

 So in hiera I've got:

 users_common:
 user1:
 ensure: present
 home: /home/user1
 managehome: true
 user2:
 ensure: present
 home: /home/user2
 managehome: true

 I'm using users_common with a create_resources in one class but I'd
 like to just pull out user1, user2 into an array from users_common for
 a different class.

 Is this possible?

 Something like:

 $users_c = hiera('users_common')
 $users = ${users_c['keys']}
 notify { ${users}: }

 Thanks,

 --
 Kent



  --
 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%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CA%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 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/CAJGKfwBua4tAsioMYT6SGb4FdD-scxFCgpHHeDjUxQJzT2XEhw%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CAJGKfwBua4tAsioMYT6SGb4FdD-scxFCgpHHeDjUxQJzT2XEhw%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Kent Brede

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


[Puppet Users] hiera variable and if statements in manifest not working

2014-02-26 Thread Kenton Brede
So I've got a variable set in Hiera:

---
vmw_tools_purge:
- 'PURGE'

In the manifest, the following works fine:

$vmw_tools_purge = hiera('vmw_tools_purge')
notify { $vmw_tools_purge: }

But this does not work.  The if statement is just ignored and notify
isn't triggered.  What am I doing wrong?

if $vmw_tools_purge == 'PURGE' {
notify { $vmw_tools_purge: }
}

Thanks,

-- 
Kent Brede

-- 
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%2BnSE38yx9srQ-R6e-J%2Bd10Yg4s-Tccm8prJkNL7k%2BBM1_SF%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] hiera variable and if statements in manifest not working

2014-02-26 Thread Kenton Brede
On Wed, Feb 26, 2014 at 8:26 AM, Felix Frank 
felix.fr...@alumni.tu-berlin.de wrote:

 Hi,

 On 02/26/2014 03:18 PM, Kenton Brede wrote:
  vmw_tools_purge:
  - 'PURGE'

 not that you are defining an array here, not a string. That would look like

 vm_tools_purge: 'PURGE'

  $vmw_tools_purge = hiera('vmw_tools_purge')
  notify { $vmw_tools_purge: }

 This works because puppet helpfully converts the array to a string by
 concatenating all elements.

  if $vmw_tools_purge == 'PURGE' {

 This would not work the same way, though. You may verify whether

 if $vmw_tools_purge == [ 'PURGE' ]

 does in fact work, but it would be a funny construct anyway. It should
 be fixed in YAML.


Doh!  That was it, thanks.

-- 
Kent Brede

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


[Puppet Users] How to purge and install package on same run?

2014-02-25 Thread Kenton Brede
I've got a situation where I need to remove a set of packages and then
install the upgraded versions.  I can't just upgrade.  It's rare that I
have to upgrade the software but I'd like to have something in place to
upgrade when I have to.  What's the best way to handle these types of
situations with Puppet?

Is there anyway to force $purge_pkgs to run and then have $install_pkgs run
after on the same run?  As written below, I think what happens is the
packages are uninstalled but when the compile runs, $install_pkgs are
already installed, so it does nothing.

Class upgrade:
-
if $upg == 'yes' {
package { $purge_pkgs:
ensure  = 'purged',
install_options = '-y',
}
}

package { $install_pkgs:
ensure  = installed,
install_options = '-y',
}

Bunch of other bits run.
--

Any advice appreciated.
Thanks,

-- 
Kent

-- 
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%2BnSE38fD8XVEeb74CKmFyBhcw5-syMj%3DL-XMu%3Dk0pPUhvOSUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Apache/Passenger RHEL6 not working

2011-09-15 Thread Kenton Brede
On Wed, Sep 14, 2011 at 12:33 PM, Gary Larizza g...@puppetlabs.com wrote:


 On Wed, Sep 14, 2011 at 11:12 AM, Kenton Brede kbr...@gmail.com wrote:

 I'm attempting to move from a working puppetmaster setup to
 Apache/Passenger.  I'm following the instructions in the Pro Puppet
 book.  I'm using the epel repo and running puppet 2.6.6.  Passenger
 version 3.0.9 from the stealthymonkeys repo.  Running puppetd -t -d
 doesn't seem to tell me anything significant.  There's no complaining
 about SSL issues.

 My nodes can't find the catalog, based on the error message puppetd
 -t spits out:

 err: Could not retrieve catalog from remote server:
 Puppet::Resource::Catalog does not respond to from_s; can not intern
 instances from text/plain
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run

 I've googled the error and haven't found anything that helps so far.
 The catalog is currently in /etc/puppet/modules/. I really don't know
 anything about Passenger.  I fail to see in the apache/passenger
 configuration how the puppetmaster is called when a client connects to
 port 8140.  I see that apache is handling the SSL stuff but how does
 the puppetmaster fit into this?

 Any help appreciated.
 Thanks,

 --
 Kent Brede


 Kent,
 I recommend taking a look at the online document here
 -- http://docs.puppetlabs.com/guides/passenger.html  There are specific
 versions of Passenger and the Rack gem that are necessary for Puppet to work
 properly.  I suspect you're using a version of one (possibly Rack) that's
 incompatible here.

Gary,
I using gem I installed the version for rhel6, listed in the document
you recommended: Passenger 3.0.7 and Rack 1.2.2.  I also removed these
and installed the versions cited in the Pro Puppet book: Passenger
2.2.11 and Rack 1.1.0.  Both configurations resulted in the same error
as I had before:

# puppetd -t
err: Could not retrieve catalog from remote server:
Puppet::Resource::Catalog does not respond to from_s; can not intern
instances from text/plain
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

If you have any other ideas, let me know.
Thanks,
Kent

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Apache/Passenger RHEL6 not working

2011-09-15 Thread Kenton Brede
On Thu, Sep 15, 2011 at 1:46 PM, Kenton Brede kbr...@gmail.com wrote:
 On Wed, Sep 14, 2011 at 11:30 PM, Ashwin N ashy.n...@gmail.com wrote:
 Hi

 Passenger is a rack application - will run out of httpd .

 Have you got anything like the following in your passenger (httpd)
 configuration file:

     DocumentRoot /etc/puppet/rack/public/
     RackBaseURI /
     Directory /etc/puppet/rack/
     Options None
     AllowOverride None
     Order allow,deny
     allow from all
     /Directory

 Yep I have this in my configuration:

 DocumentRoot /etc/puppet/rack/puppetmaster/public/
 Directory /etc/puppet/rack/puppetmaster/
    Options None
    AllowOverride None
    Order allow,deny
    allow from all
 /Directory

 Is there something I'm suppose to be putting in these directories?
 Ultimately following error messages I created directories and an empty
 file: 
 /etc/puppet/rack/puppetmaster/public/production/catalog/puppet2.example.com.
  Is there suppose to be something put in puppet2.example.com?
 Thanks,

To answer my own question, no do not put files in this directory.
When I removed the puppet2.example.com, the Apache/Passenger setup
started to work.

-- 
Kent Brede
http://gplus.to/kbrede
http://sandhillsnaps.com/
http://aphotoaday.sandhillsnaps.org/
http://www.pentaxphotogallery.com/kentonbrede

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Apache/Passenger RHEL6 not working

2011-09-15 Thread Kenton Brede
I finally got this to work with passenger-3.0.7 and rack-1.2.2 by
removing a file I'd created in:
/etc/puppet/rack/puppetmaster/public/production/catalog/.  Now that I
know how this works, I'll try using a more current passenger and rack
and see if it works.

Kent

On Thu, Sep 15, 2011 at 1:37 PM, Kenton Brede kbr...@gmail.com wrote:
 On Wed, Sep 14, 2011 at 12:33 PM, Gary Larizza g...@puppetlabs.com wrote:


 On Wed, Sep 14, 2011 at 11:12 AM, Kenton Brede kbr...@gmail.com wrote:

 I'm attempting to move from a working puppetmaster setup to
 Apache/Passenger.  I'm following the instructions in the Pro Puppet
 book.  I'm using the epel repo and running puppet 2.6.6.  Passenger
 version 3.0.9 from the stealthymonkeys repo.  Running puppetd -t -d
 doesn't seem to tell me anything significant.  There's no complaining
 about SSL issues.

 My nodes can't find the catalog, based on the error message puppetd
 -t spits out:

 err: Could not retrieve catalog from remote server:
 Puppet::Resource::Catalog does not respond to from_s; can not intern
 instances from text/plain
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run

 I've googled the error and haven't found anything that helps so far.
 The catalog is currently in /etc/puppet/modules/. I really don't know
 anything about Passenger.  I fail to see in the apache/passenger
 configuration how the puppetmaster is called when a client connects to
 port 8140.  I see that apache is handling the SSL stuff but how does
 the puppetmaster fit into this?

 Any help appreciated.
 Thanks,

 --
 Kent Brede


 Kent,
 I recommend taking a look at the online document here
 -- http://docs.puppetlabs.com/guides/passenger.html  There are specific
 versions of Passenger and the Rack gem that are necessary for Puppet to work
 properly.  I suspect you're using a version of one (possibly Rack) that's
 incompatible here.

 Gary,
 I using gem I installed the version for rhel6, listed in the document
 you recommended: Passenger 3.0.7 and Rack 1.2.2.  I also removed these
 and installed the versions cited in the Pro Puppet book: Passenger
 2.2.11 and Rack 1.1.0.  Both configurations resulted in the same error
 as I had before:

 # puppetd -t
 err: Could not retrieve catalog from remote server:
 Puppet::Resource::Catalog does not respond to from_s; can not intern
 instances from text/plain
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run

 If you have any other ideas, let me know.
 Thanks,
 Kent


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Apache/Passenger RHEL6 not working

2011-09-14 Thread Kenton Brede
I'm attempting to move from a working puppetmaster setup to
Apache/Passenger.  I'm following the instructions in the Pro Puppet
book.  I'm using the epel repo and running puppet 2.6.6.  Passenger
version 3.0.9 from the stealthymonkeys repo.  Running puppetd -t -d
doesn't seem to tell me anything significant.  There's no complaining
about SSL issues.

My nodes can't find the catalog, based on the error message puppetd
-t spits out:

err: Could not retrieve catalog from remote server:
Puppet::Resource::Catalog does not respond to from_s; can not intern
instances from text/plain
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

I've googled the error and haven't found anything that helps so far.
The catalog is currently in /etc/puppet/modules/. I really don't know
anything about Passenger.  I fail to see in the apache/passenger
configuration how the puppetmaster is called when a client connects to
port 8140.  I see that apache is handling the SSL stuff but how does
the puppetmaster fit into this?

Any help appreciated.
Thanks,

-- 
Kent Brede
http://gplus.to/kbrede
http://sandhillsnaps.com/
http://aphotoaday.sandhillsnaps.org/

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] combining arrays in site.pp

2010-05-28 Thread Kenton Brede
I'm running 0.25.4.  What I'd like to do is place an array of users
under the default node.  These users rarely change.  Then within each
subsequent node, have another array of users added to the original
array.  These users change more frequently.  These users are then be
snarfed into a template.  The setup I've been using is adding all the
users to one array in each node definition.

I've read that using += will add arrays to one another, but I keep
getting a Could not parse for environment testing: Syntax error at
'='; expected '}' at /etc/puppet/manifests/testing/site.pp:54 error.
Is += just not allowed in site.pp?

This is an example of what I have.

site.pp
-
node basenode {
$users_group = ['user0', 'user1']
}

node server1 inherits basenode {
$users_group += ['user2', 'user3', 'user4']
}
-

What I'm expecting from the above is $users_group = ['user0', 'user1',
'user2', 'user3', 'user4']

Thanks for any help.
Kent

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] combining arrays in site.pp

2010-05-28 Thread Kenton Brede
On Fri, May 28, 2010 at 11:15 AM, Michael DeHaan mich...@puppetlabs.com wrote:
 On Fri, May 28, 2010 at 11:57 AM, Kenton Brede kbr...@gmail.com wrote:
 I'm running 0.25.4.  What I'd like to do is place an array of users
 under the default node.  These users rarely change.  Then within each
 subsequent node, have another array of users added to the original
 array.  These users change more frequently.  These users are then be
 snarfed into a template.  The setup I've been using is adding all the
 users to one array in each node definition.

 I've read that using += will add arrays to one another, but I keep
 getting a Could not parse for environment testing: Syntax error at
 '='; expected '}' at /etc/puppet/manifests/testing/site.pp:54 error.
 Is += just not allowed in site.pp?

 This is an example of what I have.

 site.pp
 -
 node basenode {
    $users_group = ['user0', 'user1']
 }

 node server1 inherits basenode {
    $users_group += ['user2', 'user3', 'user4']
 }

 Puppet uses + for appending to arrays.

 Here's the feature where it was added:
 http://projects.puppetlabs.com/issues/1584

Doh!  Looks like me just being an idiot.  I won't even tell you.
:)  Anyway += is working just fine in my site.pp now.
Thanks,
Kent

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Facter 1.5.7 and operatingsystemrelease

2009-12-22 Thread Kenton Brede
On Tue, Oct 20, 2009 at 8:45 PM, Ohad Levy ohadl...@gmail.com wrote:
 Hi,

 I for one, thinks that the operatingsystemrelease fact should contain only
 the major number of the operating system, e.g. for Centos/Rehat 5.4 it
 should return just 5.

 the reason behind it is that I rarely use the full release version as a
 variable, and if I do, I use the lsb facts.

 this change is very annoying, as it requires to change your manifest again
 (we had the same issue between facter 1.38 and 1.5.0).

 I ended up having my own fact which is just a wrapper for the
 operatingsystem relase, as it one point of time I might have multiple facter
 version running around


I searched through old messages and didn't see that this had been
addressed.  I can see people wanting facter to report the minor
version and others wanting just the major release number.  The way it
stands I'll need to change every operatingystemrelease variable, each
time a new minor version come out.  That's a pain I don't need.  So
I'll work around this by creating my own fact.  Having two variables
for the OS release seems to me a good choice.  Just my 2 cents.
Kent

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Re: Module Standards

2008-09-30 Thread Kenton Brede

On Mon, Sep 29, 2008 at 1:30 PM, Digant C Kasundra [EMAIL PROTECTED] wrote:


 - Kenton Brede [EMAIL PROTECTED] wrote:

 My question is, what's wrong with this setup?  I ask this realizing
 the smallness of our
 operation makes me a little myopic.

 With a small operation, it is okay.  With something larger, it doesn't scale 
 well and it doesn't make good use of module grouping.  For instance, when 
 setting up openldap, I want to talk about what I do (packages I install, conf 
 files I drop in, etc) all in one place so I can see what I do with openldap 
 as a whole more easily.  If it were broken out into several places based on 
 OS type, it isn't quite as easy to ensure that each OS type is similar.  For 
 instance, on a debian box and a redhat box, I can look at classes.txt and see 
 that openssh class is applied, so I know that I'm managing openssh on debian 
 and redhat boxes, but with the other approach, I wouldn't be able to see that 
 without digging into the debian.pp and redhat.pp files.


Hmmm, unless I'm missing something, what you describe is what I'm
doing.  If I'm wrong please let me know.

Currently I have two types of modules:

Modules based on type (file, cron, etc) that are not tied to a
particular service.  For example, a custom script that goes to host
foo, or a group such as rhel5.  And modules based on a service
(apache, iptables, etc), which contain any resources that are needed.

The only time I have a rhel5.pp class, is if it's as sub-module.  For
example cron::rhel5.pp, which contains cron jobs for rhel5  servers.
Or apache::rhel5.pp, which contains rhel5 specifics for that group.  I
don't have a single class rhel5.pp where I try to manage all
resources, if that's what you thought I did.

snip

 Could you give a couple examples of what you mean by action type
 and
 functional role?

 An action type is like sort of like what you do to a system.  So, things 
 like install this file or install this package.  Functional role is 
 things like manage openldap or ensure these users are present which would 
 in turn include actions like installing packages or files or setting up user 
 preferences.


Thanks for the clarification :)
Kent

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Module Standards

2008-09-23 Thread Kenton Brede

Except foo::_files is a syntax error..
Kent

2008/9/23 Kenton Brede [EMAIL PROTECTED]:
 I vote for foo::_files.
 Kent

 2008/9/22 Digant C Kasundra [EMAIL PROTECTED]:

 When things are fairly small, it isn't an issue and certainly documentation 
 is key.  I'm just very OCD about conventions and naming and I like having 
 things named in ways that it is explicit to the purpose.  Generally, it is 
 fairly easy to tell that ssh::files would most likely be a class that deals 
 with the files associated with setting up ssh and not some variation of how 
 ssh is setup.  But, in general, when I see foo::bar, I assume bar is a 
 subclass (ergo derivative of) foo.  But since both fragments and subclasses 
 are useful in Puppet, for those that so feel inclined (and I think the 
 Puppet community has expressed interest in consistent style and practice 
 guides to grow the community closer), I think a naming convention to 
 differentiate is valuable, even if just for us OCD folks. :)


 - Original Message -
 From: Kenton Brede [EMAIL PROTECTED]
 To: puppet-users@googlegroups.com
 Sent: Tuesday, September 16, 2008 12:40:09 PM GMT -08:00 US/Canada Pacific
 Subject: [Puppet Users] Re: Module Standards


 2008/9/16 Digant C Kasundra [EMAIL PROTECTED]:

 So my proposal is if there is need or want to break up large classes, the 
 fragment class (i.e. foo::files) be named specifically in a way that makes 
 it clear it is not a complete and functional class but only a fragment.  
 Such a naming convention might call for something like foo::_files or 
 foo::inc::files.  I would like to open this topic up to discussion to the 
 greater community (you guys) and see what you think.


 I guess I could see this if the classes were scattered throughout 
 /manifests/.
 I approach module building the same way in terms of breaking the classes
 into smaller pieces.  I guess I don't see a specific need for a
 fragment designation.
 I usually create a class named foo in init.pp and include the sub
 classes there:

 class files {
 # include files class groups
 include files::all
 include files::rhel5
 # include files class hosts
 include files::host1
 }

 In site.pp I just include foo.  I document all this in the README
 and comment the init.pp file.  It just seems natural to me that way.
 My setup isn't probably as complex as some so maybe I'm missing
 something..
 Kent



 --
 Digant C Kasundra [EMAIL PROTECTED]
 Technical Lead, ITS Unix Systems and Applications, Stanford University

 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Module Standards

2008-09-16 Thread Kenton Brede

2008/9/16 Digant C Kasundra [EMAIL PROTECTED]:

 Hello everyone,

 My team and I have been mulling over the module standards that were proposed 
 (http://www.reductivelabs.com/trac/puppet/wiki/ModuleStandards)

 Members of our team like to break large classes up into tiny pieces, which 
 isn't covered in this doc.  For instance, if a class declares 10 files and 12 
 packages and 5 services, there is a preference to break these into 
 foo::files, foo::packages, and foo:services and then have foo include these 
 things.  My problem with this is that I like to preserve a clear 
 representation that :: denotes that the thing following is a subclass of the 
 thing proceeding (so ssh::server means this is a subclass of ssh, relating 
 specifically to ssh).

 So my proposal is if there is need or want to break up large classes, the 
 fragment class (i.e. foo::files) be named specifically in a way that makes it 
 clear it is not a complete and functional class but only a fragment.  Such a 
 naming convention might call for something like foo::_files or 
 foo::inc::files.  I would like to open this topic up to discussion to the 
 greater community (you guys) and see what you think.


I guess I could see this if the classes were scattered throughout /manifests/.
I approach module building the same way in terms of breaking the classes
into smaller pieces.  I guess I don't see a specific need for a
fragment designation.
I usually create a class named foo in init.pp and include the sub
classes there:

class files {
 # include files class groups
 include files::all
 include files::rhel5
 # include files class hosts
 include files::host1
}

In site.pp I just include foo.  I document all this in the README
and comment the init.pp file.  It just seems natural to me that way.
My setup isn't probably as complex as some so maybe I'm missing
something..
Kent

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: custom fact help

2008-09-12 Thread Kenton Brede

Follow up on this:

My code was fine.  Somehow the level variable I was using got stuck
on normal.  That is, when I ran puppetd -t.
Even if I removed level = normal from the manifest, just leaving
level = confidential, normal was returned.
When puppetd ran as a daemon, the correct variable was returned.

The fix was to remove /var/lib/puppet/yaml/facts/puppet.example.com.yaml.

Kent

2008/9/11 Kenton Brede [EMAIL PROTECTED]:
 I'm trying to create a custom fact.  The following code works fine if puppetd
 runs as a daemon but not from the command line.  In other words if this runs
 on server5 as a daemon, the return is correct, confidential.  But if
 I run puppetd -t
 from the command line normal is returned.

 I don't really know ruby so I'm not confident about the code or using
 the facter/setcode
 method.  Anything I'm doing wrong or is this a puppet/facter bug?

 I'm using puppetd 0.24.5 and facter 1.5.1.

 Thanks,
 Kent

 
 Facter.add(security_level) do
def sec_level()
# grab hostname
require socket
hostname = Socket.gethostname

# check if hostname matches and designate security level
if hostname =~ /(server2|server5|server28)/
  level = 'confidential'
else
  level = 'normal'
end
return level
end

setcode do
sec_level
end

 end
 -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---