Re: [Puppet Users] validate_bool() throwing in error syaing the value not a boolean

2016-03-05 Thread Sans
Can this look-up done from agent as well?

-S


On Friday, March 4, 2016 at 4:52:05 PM UTC, Henrik Lindberg wrote:

>
> Recent would be >= 4.2 wrt. lookup functionality. 
> Sorry. 
> - henrik 
>
>
>

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


[Puppet Users] puppet cannot find class.

2016-03-05 Thread dE
Hi.

I've made a class in the $basemodulepath location --

puppet config print  | grep basemodulepath
basemodulepath = /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules

ls -R /etc/puppetlabs/code/modules/all_class/
/etc/puppetlabs/code/modules/all_class/:
manifests

/etc/puppetlabs/code/modules/all_class/manifests:
dep.pp  first_class.pp

Contents of first_class.pp -- 
class first_class {
file { '/tmp/fclass.txt':
ensure => present,
owner => de,
group => de,
}
file { '/tmp/procs':
ensure => directory,
source => ['puppet:///modules/filesmmodule/proc_files/'],
owner => de, 
group => root,
mode => '700',
recurse => true
}
file {'/tmp/procs/cpuinfo':
ensure => present,
owner => de,
group => de,
}
require Class["dep"]
}

Contents of dep.pp ---
class dep {
file { '/tmp/dep_file':  
ensure => present,
owner => de
}
}

When I call the class from the main manifest -- 

Error: Evaluation Error: Error while evaluating a Resource Statement, Could 
not find declared class first_class at /etc/puppetlabs/code/environments/
production/manifests/default.pp:1:1 on node desktopminer

It does not help if I define the class in $modulepath

Thanks for any help.

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


Re: [Puppet Users] puppet cannot find class.

2016-03-05 Thread Martin Alfke
Hi
On 05 Mar 2016, at 11:18, dE  wrote:

> Hi.
> 
> I've made a class in the $basemodulepath location --
> 
> puppet config print  | grep basemodulepath
> basemodulepath = /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
> 
> ls -R /etc/puppetlabs/code/modules/all_class/
> /etc/puppetlabs/code/modules/all_class/:
> manifests

This means you have a module with name all_class.
> 
> /etc/puppetlabs/code/modules/all_class/manifests:
> dep.pp  first_class.pp

And there are two classes inside the module.
> 
> Contents of first_class.pp -- 
> class first_class {

The class is within the module namespace.
rename it to
class all_class::first_class {

> file { '/tmp/fclass.txt':
> ensure => present,
> owner => de,
> group => de,
> }
> file { '/tmp/procs':
> ensure => directory,
> source => ['puppet:///modules/filesmmodule/proc_files/'],
> owner => de, 
> group => root,
> mode => '700',
> recurse => true
> }
> file {'/tmp/procs/cpuinfo':
> ensure => present,
> owner => de,
> group => de,
> }
> require Class["dep"]
> }
> 
> Contents of dep.pp —

Same here:
rename to
class all_class::dep {

> class dep {
> file { '/tmp/dep_file':  
> ensure => present,
> owner => de
> }
> }
> 
> When I call the class from the main manifest -- 
> 
> Error: Evaluation Error: Error while evaluating a Resource Statement, Could 
> not find declared class first_class at 
> /etc/puppetlabs/code/environments/production/manifests/default.pp:1:1 on node 
> desktop miner

I suppose you have something like include first_class in your manifest.
Puppet searches for
$basemodulepath/first_class/manifests/init.pp

> 
> It does not help if I define the class in $modulepath
> 
> Thanks for any help.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/b0c4b1d7-7972-4a8e-aa71-ac2930a29513%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


[Puppet Users] Re: puppet cannot find class.

2016-03-05 Thread Sans
I've never used a module with out a init.pp, so cannot tell you if that's 
the issue, I think it's not.
But normally this what I would do:

class all_class::first_class {  } and  class all_class::dep {  }

Probably worth giving a try.
On a general note, you should have all the owner, group values within the 
single-quote. But that's not to actual issue though.

-S 

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


Re: [Puppet Users] puppet cannot find class.

2016-03-05 Thread dE
Now I see the bigger picture. Looks like this 
 
documentation is wrong.

Thanks for the help everyone!

On Saturday, March 5, 2016 at 5:00:17 PM UTC+5:30, Martin Alfke wrote:
>
> Hi 
> On 05 Mar 2016, at 11:18, dE > wrote: 
>
> > Hi. 
> > 
> > I've made a class in the $basemodulepath location -- 
> > 
> > puppet config print  | grep basemodulepath 
> > basemodulepath = 
> /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules 
> > 
> > ls -R /etc/puppetlabs/code/modules/all_class/ 
> > /etc/puppetlabs/code/modules/all_class/: 
> > manifests 
>
> This means you have a module with name all_class. 
> > 
> > /etc/puppetlabs/code/modules/all_class/manifests: 
> > dep.pp  first_class.pp 
>
> And there are two classes inside the module. 
> > 
> > Contents of first_class.pp -- 
> > class first_class { 
>
> The class is within the module namespace. 
> rename it to 
> class all_class::first_class { 
>
> > file { '/tmp/fclass.txt': 
> > ensure => present, 
> > owner => de, 
> > group => de, 
> > } 
> > file { '/tmp/procs': 
> > ensure => directory, 
> > source => 
> ['puppet:///modules/filesmmodule/proc_files/'], 
> > owner => de, 
> > group => root, 
> > mode => '700', 
> > recurse => true 
> > } 
> > file {'/tmp/procs/cpuinfo': 
> > ensure => present, 
> > owner => de, 
> > group => de, 
> > } 
> > require Class["dep"] 
> > } 
> > 
> > Contents of dep.pp — 
>
> Same here: 
> rename to 
> class all_class::dep { 
>
> > class dep { 
> > file { '/tmp/dep_file':   
> > ensure => present, 
> > owner => de 
> > } 
> > } 
> > 
> > When I call the class from the main manifest -- 
> > 
> > Error: Evaluation Error: Error while evaluating a Resource Statement, 
> Could not find declared class first_class at 
> /etc/puppetlabs/code/environments/production/manifests/default.pp:1:1 on 
> node desktop miner 
>
> I suppose you have something like include first_class in your manifest. 
> Puppet searches for 
> $basemodulepath/first_class/manifests/init.pp 
>
> > 
> > It does not help if I define the class in $modulepath 
> > 
> > Thanks for any help. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/b0c4b1d7-7972-4a8e-aa71-ac2930a29513%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

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


Re: [Puppet Users] validate_bool() throwing in error syaing the value not a boolean

2016-03-05 Thread Henrik Lindberg

On 05/03/16 09:42, Sans wrote:

Can this look-up done from agent as well?

-S



The first release of lookup runs on the master side, but it uses the 
last facts posted by the node; so result is node specific. No way 
currently to run it from an agent against the master though.


If you are set up so that puppet apply works on the agent, then lookup 
will also work there.


- henrik



On Friday, March 4, 2016 at 4:52:05 PM UTC, Henrik Lindberg wrote:


Recent would be >= 4.2 wrt. lookup functionality.
Sorry.
- henrik


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



--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

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


[Puppet Users] Re: Trying to manage proper replication for PostgreSQL with Puppet

2016-03-05 Thread Byron Miller
The current postgres module doesn't implement replication by default. I use 
the module to build up the DB and get everything going, but the log 
shipping is setup manually since the failover would be manual.   
Postgres/mysql are moving towards handling this better internally so the 
issue may be moot in the future.  PuppetPE with orchestrator may take out 
some of the complexity and make it more trivial and i know they're making a 
new PE PupeptDB that is more active/active.

I found out the hard way though i was better off making sure i could 
rebuild PuppetDB quickly than needing an HA puppetdb..  puppetdb itself has 
never died on us so the usecase of availability has gone out the door and 
they have optimized it nicely that distributed reads isn't an issue anymore 
and quite frankly, created more problems than i wished.  It stinks when the 
log shipper fails and you get stale reads because you're configured to read 
from read-only standby but all of the tooling is behaving like everything 
is a-ok..  once i started writing conditional logic to look for these 
exceptions i realized that was a job i didn't want to have so i just made 
it super trivial to bootstrap and collect data quickly again.

we don't use exported resources or anything that would cause a state 
failure in our system if puppetdb failed, just nodes would be in limbo for 
the period querying some stuff but its a safe failed state.

On Wednesday, February 24, 2016 at 9:05:24 PM UTC-6, Ken Lareau wrote:
>
> I'm not sure if anyone here will be able to help, but I feel I need to 
> give it
> a shot, so...
>
> My team is in the process of getting ready to use PostgreSQL, but before
> that I need to ensure that our Puppet infrastructure can manage the systems
> properly, which means making sure replication stays working even when
> a box needs to be rebuilt.  I'm using the PuppetLabs 'postgresql' module
> which seems pretty thorough, but I don't believe it's sufficient to 
> actually
> handle recovery from a rebuild, so I'm asking here to see if anyone's 
> already
> gone through this process before and could give some pointers, perhaps?
> The plan is to use the latest release (9.5.1) which is supposed to make 
> this
> easier, but digging around the web hasn't turned up anything useful so far.
> Might someone be able to help?  I can give more details as needed.
>
> (Apologies if this is off-topic for this list in any way.)
>
> Thanks in advance.
>
> -- 
> Ken Lareau
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/517830ca-f2a0-4324-b94c-bbe3f978781a%40googlegroups.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&query=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,  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
> 
> .
> 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] mcollective modules for puppet4

2016-03-05 Thread Francois Lafont
Hi,

On 05/03/2016 20:17, Kenton Brede wrote:

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

In my case, not with Ubuntu Trusty and Debian Jessie.

Indeed the last time I have tried (2016/01/19), there were issues with Trusty
and Jessie. My detailed explanation are here:

https://tickets.puppetlabs.com/browse/MCO-722?focusedCommentId=254652

Regards.

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