Re: [Puppet Users] Trouble using type Stdlib::Windowspath

2017-01-09 Thread Martin Alfke
Hi Henrik,


> A non-existent type will in some versions of puppet be taken as being a 
> resource type.
> 
> One thing you can check is that your module (where you are using Stdlib::XXX 
> types have declared a dependency on Stdlib in its metadata. If it does not 
> have this it will not find types in Stdlib.

do I get that right:

Self defined data types (in Modules) are only working when adding a 
metdata.json file to the module which makes use of the self defined data type?
Or with other words: self defined data types are not autoloaded?

Best,
Martin

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


Re: [Puppet Users] Error with puppet in CentOS 7 - NoMethodError

2017-01-21 Thread Martin Alfke
The error comes from system ruby.
Have you installed the AIO package?

Maybe it is facter.
Please see whether you can run the facter command successfully.

> On 21 Jan 2017, at 02:49, Gustavo S. L.  wrote:
> 
> When I execute puppet in a container with centos 7 I get this:
> 
> /usr/share/rubygems/rubygems/path_support.rb:68:in `path=': undefined method 
> `+' for nil:NilClass (NoMethodError)
>   from /usr/share/rubygems/rubygems/path_support.rb:30:in `initialize'
>   from /usr/share/rubygems/rubygems.rb:357:in `new'
>   from /usr/share/rubygems/rubygems.rb:357:in `paths'
>   from /usr/share/rubygems/rubygems.rb:379:in `path'
>   from /usr/share/rubygems/rubygems/specification.rb:794:in `dirs'
>   from /usr/share/rubygems/rubygems/specification.rb:658:in `each_normal'
>   from /usr/share/rubygems/rubygems/specification.rb:669:in `_all'
>   from /usr/share/rubygems/rubygems/specification.rb:822:in `each'
>   from /usr/share/rubygems/rubygems/specification.rb:864:in `find'
>   from /usr/share/rubygems/rubygems/specification.rb:864:in 
> `find_inactive_by_path'
>   from /usr/share/rubygems/rubygems.rb:175:in `try_activate'
>   from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in 
> `rescue in require'
>   from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in 
> `require'
>   from :2:in `'
> 
> What's happening? How can I solve it? Thank'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/CAOO4BW1hEhiryh3EDcf%2BD8ZfBwCP7aDaJknyHVZZKj%3DvL92H9Q%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/192B6B1A-C75F-4903-AA74-0F67B33A0E3E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] access variable inside module which was declared at inside profile

2017-01-23 Thread Martin Alfke
You can access other modules variables by using the namespace of the variable 
as long as the class with the referring variable is known to the catalog 
compilation (has been included or declared).

e.g.
# modules/abc/manifests/init.pp
class abc {
  $var = ‘foo’
}

# site/profile/manifests/abc.pp
class profile::abc {
  include abc
  $var = $abc::var
  notify { $var: }
}

puppet apply -e ‘include profile::abc’
will return notify ‘foo’


> On 23 Jan 2017, at 23:21, java.frea...@gmail.com wrote:
> 
> Hi Everyone,
> 
>  Am very new to puppet. Can any one please help me to fix this issue 
> !!
> I need to access $var1 at inside module folder actually which 
> declared at profile.
>   
>   
> #
>  /etc/puppetlabs/puppet/environment/dev/site/profile/manifest/abc.pp
> 
>   class profile::abc($var1 = '5' ) 
> {
>  --- // some code here // 
> 
> }
> ###
> /etc/puppetlabs/puppet/environment/dev/module/abc/manifest/abc.pp
> I need to access $var1 in this file :- /module/abc/manifest/abc.pp
> class abc($var1 = undef)
> {
>   // I want to access $var1 in this class. How I can access    // 
> -
> }
> 
> -- 
> 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/ac7cfed8-3526-4df5-97c0-107fb05b4231%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/C69CE134-46E8-4FB0-983B-F90C6336F317%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Local variables lost outside of .each loop

2017-01-30 Thread Martin Alfke
AFAIK all variables inside a lambda are “private”:
https://docs.puppet.com/puppet/latest/lang_lambdas.html#lambda-scope


> On 30 Jan 2017, at 21:49, Justin Diana  wrote:
> 
> Hey guys,
> 
> I'm trying to loop through a hash to set a variable and then use it outside 
> of the loop.  For some reason, although my debug shows the variable is 
> getting set to the correct value, it's NULL as soon as I move up a layer in 
> the nested loop:
> 
> $lb_info.each |$k, $v| {
> $myaddress = ''
> $myid = ''
> $v.each |$key, $value| {
> if $key == 'address' {
> $myaddress = $value
> notify {"this is a debug message: found ${key}: 
> ${value}: ${myaddress}" :
> loglevel => debug,
> }
> }
> if $key == 'id' {
> $myid = $value
> notify {"this is a debug message: found ${key}: 
> ${value}: ${myid}" :
> loglevel => debug,
> }
> }
> }
> 
> notify {"this is a debug message: found ${myaddress}: ${myid} for 
> ${k}" :
>loglevel => debug,
> }
> }
> 
> Everything shows the correct values except for the last notify... it shows 
> blank values for ${myaddress} and ${myid}.
> 
> Why is that?
> 
> -- 
> 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/6b011cee-e099-4e43-a0b8-e0810bec81eb%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/B29E0104-FDD3-402A-8B99-AA90B85337CB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [Puppet-dev] Draft for new type and provider API

2017-02-03 Thread Martin Alfke
Hi David,

many thanks for sharing your ideas.

As you already know: personally I don’t say that types and providers are way to 
difficult.
It is more a matter on how to explain them.
I will dig through your document during weekend. We can have a chat on Monday 
in Ghent.

But besides this:
is your idea somehow related to the libral project?
https://github.com/puppetlabs/libral 

Best,
Martin


> On 31.01.2017, at 17:04, David Schmitt  wrote:
> 
> Hi *,
> 
> The type and provider API has been the bane of my existence since I [started 
> writing native 
> resources](https://github.com/DavidS/puppet-mysql-old/commit/d33c7aa10e3a4bd9e97e947c471ee3ed36e9d1e2
>  
> ).
>  Now, finally, we'll do something about it. I'm currently working on 
> designing a nicer API for types and providers. My primary goals are to 
> provide a smooth and simple ruby developer experience for both scripters and 
> coders. Secondary goals were to eliminate server side code, and make puppet 4 
> data types available. Currently this is completely aspirational (i.e. no real 
> code has been written), but early private feedback was encouraging.
> 
> To showcase my vision, this 
> [gist](https://gist.github.com/DavidS/430330ae43ba4b51fe34bd27ddbe4bc7 
> ) has the 
> [apt_key 
> type](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/type/apt_key.rb
>  
> )
>  and 
> [provider](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/provider/apt_key/apt_key.rb
>  
> )
>  ported over to my proposal. The second example there is a more long-term 
> teaser on what would become possible with such an API. 
> 
> The new API, like the existing, has two parts: the implementation that 
> interacts with the actual resources, a.k.a. the provider, and information 
> about what the implementation is all about. Due to the different usage 
> patterns of the two parts, they need to be passed to puppet in two different 
> calls: 
> 
> The `Puppet::SimpleResource.implement()` call receives the `current_state = 
> get()` and `set(current_state, target_state, noop)` methods. `get` returns a 
> list of discovered resources, while `set` takes the target state and enforces 
> those goals on the subject. There is only a single (ruby) object throughout 
> an agent run, that can easily do caching and what ever else is required for a 
> good functioning of the provider. The state descriptions passed around are 
> simple lists of key/value hashes describing resources. This will allow the 
> implementation wide latitude in how to organise itself for simplicity and 
> efficiency.  
> 
> The `Puppet::SimpleResource.define()` call provides a data-only description 
> of the Type. This is all that is needed on the server side to compile a 
> manifest. Thanks to puppet 4 data type checking, this will already be much 
> more strict (with less effort) than possible with the current APIs, while 
> providing more automatically readable documentation about the meaning of the 
> attributes. 
>   
> 
> Details in no particular order:
> 
> * All of this should fit on any unmodified puppet4 installation. It is 
> completely additive and optional. Currently.
> 
> * The Type definition 
>   * It is data-only.
>   * Refers to puppet data types.
>   * No code runs on the server.
>   * This information can be re-used in all tooling around displaying/working 
> with types (e.g. puppet-strings, console, ENC, etc.).
>   * autorelations are restricted to unmodified attribute values and constant 
> values.
>   * No more `validate` or `munge`! For the edge cases not covered by data 
> types, runtime checking can happen in the implementation on the agent. There 
> it can use local system state (e.g. different mysql versions have different 
> max table length constraints), and it will only fail the part of the resource 
> tree, that is dependent on this error. There is already ample precedent for 
> runtime validation, as most remote resources do not try to replicate the 
> validation their target is already doing anyways.
>   * It maps 1:1 to the capabilities of PCore, and is similar to the libral 
> interface description (see 
> [libral#1](https://github.com/puppetlabs/libral/pull/2) 
> ). This ensures future 
> interoperability between the different parts of the ecosystem.
>   * Related types can share common attributes by sharing/merging the 
> attribute hashes.
>   * `defaults`, `read_only`, and similar data about attributes in the 
> definition are mostly aesthetic at the current point in time, but will make 
> for better documentation, and allow 

[Puppet Users] Re: [Puppet-dev] Draft for new type and provider API

2017-02-05 Thread Martin Alfke
Hi David,

I found some time digging into your proposal.
It seems as if we are following completely different approaches. I hope that my 
email will not upset or offend you.

Usually I hear lot of people complaining, that types and providers are the most 
complex thing todo with Puppet.
Especially since the DSL is easy to read and understand.
When I thought about “making types and providers more easy to use” I always 
think about the simplicity of Puppet DSL and never thought about a new ruby API.

I am happy to chat with you tomorrow. But I don’t see how Types and Providers 
will be more easy using your proposed API.
It seems to me as if you are “hiding” some things which are hard to understand 
- similar to mk_resource_methods which is useful when following some silent 
assumptions.
I always prefer Puppet to be as simple as possible which means: do everything 
as obvious as possible.

Different to your proposal I thought whether it would be a possible way to 
reuse Puppet DSL for types and providers.
Maybe it is a silly idea. I am interested in your opinion.

Think of something like the following (yes, I know, “type” is already a 
reserved word):

type my_module::my_file (
  Enum['file', 'absent' ] $ensure,
  Stdlib::Absolute_path   $path = $title,
  String  $owner,
){
  def create {
exec { "create file ${path}":
  command => "touch ${path}",
  path=> '/usr/bin:/bin',
  creates => $path,
}
  }
  def destroy {
file { $path:
  ensure =>  absent,
}
  }
  property owner {
exec { "chown ${owner} on ${path}":
  command => "chown ${owner} ${path}",
  path=> '/bin:/usr/bin',
  unless  => '',
}
  }
}

(I know that exec should not be used in this way.)


Always think on what users want to do:

People with ruby experience will not find types and providers difficult (in the 
way they are done today).

But Puppet was originally written for Ops people who don’t like scripting or 
coding.
They were happy having a readable, easy to understand DSL instead.
These are the ones which you want to make types/providers more easy.

Looking forward to seeing you tomorrow or later this evening.

Best,
Martin



> On 03 Feb 2017, at 12:12, Martin Alfke  wrote:
> 
> Hi David,
> 
> many thanks for sharing your ideas.
> 
> As you already know: personally I don’t say that types and providers are way 
> to difficult.
> It is more a matter on how to explain them.
> I will dig through your document during weekend. We can have a chat on Monday 
> in Ghent.
> 
> But besides this:
> is your idea somehow related to the libral project?
> https://github.com/puppetlabs/libral
> 
> Best,
> Martin
> 
> 
>> On 31.01.2017, at 17:04, David Schmitt  wrote:
>> 
>> Hi *,
>> 
>> The type and provider API has been the bane of my existence since I [started 
>> writing native 
>> resources](https://github.com/DavidS/puppet-mysql-old/commit/d33c7aa10e3a4bd9e97e947c471ee3ed36e9d1e2).
>>  Now, finally, we'll do something about it. I'm currently working on 
>> designing a nicer API for types and providers. My primary goals are to 
>> provide a smooth and simple ruby developer experience for both scripters and 
>> coders. Secondary goals were to eliminate server side code, and make puppet 
>> 4 data types available. Currently this is completely aspirational (i.e. no 
>> real code has been written), but early private feedback was encouraging.
>> 
>> To showcase my vision, this 
>> [gist](https://gist.github.com/DavidS/430330ae43ba4b51fe34bd27ddbe4bc7) has 
>> the [apt_key 
>> type](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/type/apt_key.rb)
>>  and 
>> [provider](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/provider/apt_key/apt_key.rb)
>>  ported over to my proposal. The second example there is a more long-term 
>> teaser on what would become possible with such an API. 
>> 
>> The new API, like the existing, has two parts: the implementation that 
>> interacts with the actual resources, a.k.a. the provider, and information 
>> about what the implementation is all about. Due to the different usage 
>> patterns of the two parts, they need to be passed to puppet in two different 
>> calls: 
>> 
>> The `Puppet::SimpleResource.implement()` call receives the `current_state = 
>> get()` and `set(current_state, target_state, noop)` methods. `get` returns a 
>> list of discovered resources, while `set` takes the target state and 
>> enforces those goals on the subject. There is only a single (ruby) object 
>> throughout an agent run, that can easily do caching and what e

Re: [Puppet Users] Newbie Question About Puppet

2017-02-19 Thread Martin Alfke

> On 19 Feb 2017, at 03:57, Net Warrior  wrote:
> 
> Hi, thank you for your clarification, now I've got one more doubt, should I 
> go with puppetserver and JVM ( Jetty default ?) or should I go with Passenger?

Please start using puppetserver on JVM.
It has many improvements over passenger based Puppet.

Best,
Martin

> 
> Thank  you very much for your time and support
> Regards
> 
> 
> On 02/17/2017 07:48 AM, Dominic Cleal wrote:
>> On 16/02/17 20:51, Net Warrior wrote:
>>> I'm reading some docs and it seems the lates version is 4.8, the reading
>>> about the installation it talks about Puppet server install which is
>>> version 2.6 and puppet db is 4.2, so this at first confused me, because
>>> I do not know to which package 4.8 is related to, is that a whole
>>> version number? to the whole puppet suite?
>> To use Puppet Server there are two packages you will install:
>> 
>> 1. puppet-agent
>> 2. puppet-server
>> 
>> puppet-agent contains Puppet itself and its dependencies. The latest
>> agent version is 1.9.1, which contains Puppet 4.9.2. There is a list of
>> known versions on this page:
>> https://docs.puppet.com/puppet/latest/about_agent.html
>> 
>> puppet-server adds the server components to puppet-agent. The server
>> uses Puppet from puppet-agent. The latest server version is 2.7.2, and
>> see https://docs.puppet.com/puppetserver/latest/release_notes.html for
>> the latest release notes.
>> 
>> Install puppet-agent 1.9.1 and puppet-server 2.7.2 (at the time of
>> writing) and you'll have the latest Puppet 4.9.
>> 
> 
> -- 
> 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/58A90997.2090803%40gmail.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/9EEF8337-299C-4E32-9A51-D30349B1D636%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs-sqlserver

2017-03-02 Thread Martin Alfke
There is not type mssql_instance in the module:
https://forge.puppet.com/puppetlabs/sqlserver/types

Did you follow the setup description?
https://forge.puppet.com/puppetlabs/sqlserver/readme#setup

> On 02 Mar 2017, at 12:49, Ryan Vande  wrote:
> 
> Here is my puppet module list --all
> /etc/puppetlabs/code/environments/production/site
> ├── puppetlabs-ntp (v6.0.0)
> ├── puppetlabs-sqlserver (v1.1.5)
> └── puppetlabs-stdlib (v4.15.0)
> /etc/puppetlabs/code/environments/production/modules (no modules installed)
> /etc/puppetlabs/code/modules (no modules installed)
> /opt/puppetlabs/puppet/modules
> ├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c)
> ├── puppetlabs-pe_concat (v1.1.2-7-g77ec55b)
> ├── puppetlabs-pe_console_prune (v0.1.1-9-gfc256c0)
> ├── puppetlabs-pe_hocon (v2016.2.0)
> ├── puppetlabs-pe_infrastructure (v2016.4.0)
> ├── puppetlabs-pe_inifile (v2016.2.1-rc0)
> ├── puppetlabs-pe_java_ks (v1.2.4-37-g2d86015)
> ├── puppetlabs-pe_nginx (v2016.4.0)
> ├── puppetlabs-pe_postgresql (v2016.2.0)
> ├── puppetlabs-pe_puppet_authorization (v2016.2.0-rc1)
> ├── puppetlabs-pe_r10k (v2016.2.0)
> ├── puppetlabs-pe_razor (v1.0.0)
> ├── puppetlabs-pe_repo (v2016.4.0)
> ├── puppetlabs-pe_staging (v2015.3.0)
> └── puppetlabs-puppet_enterprise (v2016.4.1)
> 
> 
> The modules in bold are what im trying to work with.
> 
> I cannot get the sqlserver module/classes to identify. I cannot work with 
> sqlserver, says can't find the module.
> 
> I can work with puppetlabs-ntp with no problem.
> 
> Does anyone have experience with puppetlabs-sqlserver that I may speak with.
> 
> My goal is to install sqlserver on my windows 2012 server, which is a puppet 
> node for the record. For the life of me this module will not load and calling 
> the class ends with :
> 
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> Server Error: Evaluation Error: Resource type not found: Mssql_instance at 
> /etc/puppetlabs/code/environments/production/manifests/site.pp:45:17 on node 
> winsql.attlocal.net   
>
> 
> 
> -- 
> 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/ecc27be9-ea78-4c90-bf6e-51bacc5c4ad8%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/BE3E5BB4-3DD5-46D5-9E41-FA8CD4B097E4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs-sqlserver

2017-03-02 Thread Martin Alfke
I can not test the sqlserver module as I don’t have PE with a valid license at 
hand right now.
Maybe you want to contact PE support:
https://puppet.com/support-services/customer-support?_ga=1.240191875.1487149708.1460034961

> On 02 Mar 2017, at 13:40, Ryan Vande  wrote:
> 
> It says to include in your manifest 
> 
> "sqlserver_instance{ 'MSSQLSERVER':
> features=> ['SQL'],
> source  => 'E:/',
> sql_sysadmin_accounts   => ['myuser'],
> }
> 
> which I did , the error I got back was " Evaluation Error: Resource type not 
> found: Mssql_instance"
> 
> What I did was place the following code in site.pp under the node definition 
> for winsql.attlocal.net :
> sqlserver_instance{ 'MSSQLSERVER':
> features=> ['SQL'],
> source  => 'E:/',
> sql_sysadmin_accounts   => ['myuser'],
> }
> 
> Either way, The only sql classes I see when trying to designate the 
> appropriate classes to the classification in the console is postgressql 
> 
> Doesn't seem this class is loading 
> 
> Im new so please correct me where im wrong 
> 
> 
> 
> On Thursday, March 2, 2017 at 6:59:19 AM UTC-5, Martin Alfke wrote:
> There is not type mssql_instance in the module: 
> https://forge.puppet.com/puppetlabs/sqlserver/types 
> 
> Did you follow the setup description? 
> https://forge.puppet.com/puppetlabs/sqlserver/readme#setup 
> 
> > On 02 Mar 2017, at 12:49, Ryan Vande  wrote: 
> > 
> > Here is my puppet module list --all 
> > /etc/puppetlabs/code/environments/production/site 
> > ├── puppetlabs-ntp (v6.0.0) 
> > ├── puppetlabs-sqlserver (v1.1.5) 
> > └── puppetlabs-stdlib (v4.15.0) 
> > /etc/puppetlabs/code/environments/production/modules (no modules installed) 
> > /etc/puppetlabs/code/modules (no modules installed) 
> > /opt/puppetlabs/puppet/modules 
> > ├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c) 
> > ├── puppetlabs-pe_concat (v1.1.2-7-g77ec55b) 
> > ├── puppetlabs-pe_console_prune (v0.1.1-9-gfc256c0) 
> > ├── puppetlabs-pe_hocon (v2016.2.0) 
> > ├── puppetlabs-pe_infrastructure (v2016.4.0) 
> > ├── puppetlabs-pe_inifile (v2016.2.1-rc0) 
> > ├── puppetlabs-pe_java_ks (v1.2.4-37-g2d86015) 
> > ├── puppetlabs-pe_nginx (v2016.4.0) 
> > ├── puppetlabs-pe_postgresql (v2016.2.0) 
> > ├── puppetlabs-pe_puppet_authorization (v2016.2.0-rc1) 
> > ├── puppetlabs-pe_r10k (v2016.2.0) 
> > ├── puppetlabs-pe_razor (v1.0.0) 
> > ├── puppetlabs-pe_repo (v2016.4.0) 
> > ├── puppetlabs-pe_staging (v2015.3.0) 
> > └── puppetlabs-puppet_enterprise (v2016.4.1) 
> > 
> > 
> > The modules in bold are what im trying to work with. 
> > 
> > I cannot get the sqlserver module/classes to identify. I cannot work with 
> > sqlserver, says can't find the module. 
> > 
> > I can work with puppetlabs-ntp with no problem. 
> > 
> > Does anyone have experience with puppetlabs-sqlserver that I may speak 
> > with. 
> > 
> > My goal is to install sqlserver on my windows 2012 server, which is a 
> > puppet node for the record. For the life of me this module will not load 
> > and calling the class ends with : 
> > 
> > Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> > Server Error: Evaluation Error: Resource type not found: Mssql_instance at 
> > /etc/puppetlabs/code/environments/production/manifests/site.pp:45:17 on 
> > node winsql.attlocal.net
> >
> > 
> > 
> > -- 
> > 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/ecc27be9-ea78-4c90-bf6e-51bacc5c4ad8%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/a882181d-f52c-41b0-9c42-446cb4932d36%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/FCDDFDBA-C35F-4BB7-8F23-FA2E84370789%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Database of Puppet Errors

2017-03-17 Thread Martin Alfke
Google has a cached version from bitcube’s Puppet errors explained:
https://webcache.googleusercontent.com/search?q=cache:1x0p9Hksk64J:https://www.bitcube.co.uk/content/puppet-errors-explained+&cd=1&hl=en&ct=clnk&gl=de&client=firefox-b-ab

> On 16 Mar 2017, at 23:56, Rich Burroughs  wrote:
> 
> I've not seen something like that.
> 
> I usually just Google for error messages or search this group. There's also 
> the Ask site:
> 
> https://ask.puppet.com/questions/
> 
> 
> Rich
> 
> 
> 
> On Sun, Mar 5, 2017 at 5:57 PM, warron.french  wrote:
> Is there a website or database that would help a new Puppet developer learn 
> what to look at for various problems during the time code is being applied to 
> a Puppet Client machine?
> 
> So much of the errors one sees has "personal specific" data in it that is 
> common of course, but there is all of the rest of the text that could be used 
> to point to the problem for the developer to look at and realize "hey dummy, 
> you forgot to write the Service['x'] resource" as an example.
> 
> 
> --
> Warron French
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CAJdJdQmao1oZ8DcUrpc9c38_GeqLndtFJcZYrRqSHNv5ehbPHg%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/CAGceory2bfki9i50sQLVA7np0m1EvwmjY4NXhCxfT_LYiQqpSg%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/8355EBC7-D497-4309-94D5-2B06299D2052%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet 4 Certification

2017-04-03 Thread Martin Alfke
Hi,
> On 03 Apr 2017, at 13:16, muhammadausafaliyou...@gmail.com wrote:
> 
> Can anyone guide us on how to prepare for Puppet 4 Certification, like what 
> books, links etc to use. Moreover, please suggest materials excluding 
> Official training Materials but equal in caliber. Has anyone passed the 4 
> exams yet?

as I am a Puppet Trainer, I must re-certify everytime when Puppet updates the 
questionaire catalog.

I can recommend the learn.puppet.com website with all the free online sessions.
Beside this it is useful to also dig into Puppet Enterprise as some questions 
will deal with PE Console. Best way to do this is using the learning vm from 
Puppet.

Additionally you can go for the following books:
- John Arundel - Puppet Cookbooks (I am unsure whether a Puppet 4 Cookbook is 
available - but basics still fit)
- Martin Alfke (me) and Felix Frank - Puppet 4 Essentials (Basics)
- Jo Rhett - Puppet 4 (Experienced)
- Alessandro Franceschi - Extending Puppet (Experienced)

Best thing you can do: work regular with Puppet.

BTW: there is no specific Puppet 4 certification.
Certification will never expire but has the year of the certification mentioned 
in the title.

hth,
Martin


> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/919d24a0-84e0-4acc-8286-78b8046a2374%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/0EBF77BA-A2CF-4AAD-AE0A-DA4D02243C3A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet certificate

2017-04-10 Thread Martin Alfke
Hi Fabrice,

> On 05 Apr 2017, at 17:02, Fabrice Bacchella  
> wrote:
> 
> One more problem, since puppet certificate --ca-location remote destroy does 
> nothing, what is the whole point of puppet certificate ? A puppet generate 
> for the same host fails because it already exist, So I can't use it to 
> remotely manage the puppet's PKI. It undermine the whole point of the command.

Have you tried puppet cert clean  ?
This command is usually used to get rid of old certificates.

> 
> 
> 
>> Le 5 avr. 2017 à 15:58, Fabrice Bacchella  a 
>> écrit :
>> 
>> I'm playing with the "puppet certificate" command.
>> 
>> But when I run "puppet certificate --ca-location remote list"
>> 
>> I see in the log:
>> 
>> 10.83.16.17 - - [05/Apr/2017:15:52:46 +0200] "GET 
>> /puppet-ca/v1/certificate_statuss/*?environment=production&for=certificate_request
>>  HTTP/1.1" 404 9 "-" "Puppet/4.9.4 Ruby/2.1.9-p490 (x86_64-linux)" 38
>> 
>> certificate_statuss ? Really ? 
>> 
>> Because meanwhile, "puppet certificate --ca-location remote sign webtester" 
>> generated:
>> 10.83.16.17 - - [05/Apr/2017:15:51:47 +0200] "PUT 
>> /puppet-ca/v1/certificate_status/webtester?environment=production& HTTP/1.1" 
>> 204 0 "-" "Puppet/4.9.4 Ruby/2.1.9-p490 (x86_64-linux)" 467
>> 
>> That's better I think.
>> 
>> And "puppet certificate --ca-location remote destroy webtester"
>> 
>> generated
>> 10.83.16.17 - - [05/Apr/2017:15:56:32 +0200] "DELETE 
>> /puppet-ca/v1/certificate/webtester?environment=production& HTTP/1.1" 403 
>> 112 "-" "Puppet/4.9.4 Ruby/2.1.9-p490 (x86_64-linux)" 15
>> 
>> I'm surprise similar command talks to different URL. It's not easy to track 
>> them in auth.conf.
>> 
>> 
>> -- 
>> 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/1B695C3B-2DE2-464B-A344-A069065D212E%40orange.fr.
>> 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/1C3F185C-1387-4C98-B4F2-6157B73E244B%40orange.fr.
> 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/E9BDC0B5-B92D-46C0-9617-42A7D83B4200%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] /etc/puppetlabs/puppetserver/conf.d/auth.conf : want to use wildcards in certificate_request section

2017-04-18 Thread Martin Alfke

> On 18 Apr 2017, at 08:03, chris  wrote:
> 
> Hi guys,
> 
> so I'm trying to restrict requests from known domains eg
> 
>   
>  { # Allow nodes to request a new certificate match-request: { path: 
> "/puppet-ca/v1/certificate_request" type: path method: [get, put] } allow: [ 
> "*.dev.XXX.com", "*.dev.YYY.com" ] sort-order: 500 name: "puppetlabs csr" },
> 
Did you restart puppetserver after doing the change?

> 
> 
> having read puppet docs on hocon style files, inc arrays, wildcards etc.
> 
> However, when I try to use this, I get
> 
> Client:
> Error: Could not request certificate: Error 403 on SERVER: Forbidden request: 
> /puppet-ca/v1/certificate_request/a.b.com (method :get). Please see the 
> server logs for details.
> 
> 
> 
> Server:
> 2017-04-13 03:20:42,855 ERROR [qtp1106686223-70] [p.t.a.rules] Forbidden 
> request: 10.112.19.76 access to /puppet-ca/v1/certificate_request/a.b.com 
> (method :get) (authenticated: false) denied by rule 'puppetlabs csr'.
> 
> 
> 
> Server version is 2.7.0 (puppet v4).
> 
> Can anybody help?
> 
> Thanks
> Chris
> 
> 
> -- 
> 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/384ce816-ea37-45ca-aa8d-83a44f0bc732%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/2B9ECE98-8A3D-4D67-B9E1-5DCD5C4A3288%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Workshop - Frankfurt/Main - Germany - 17 May 2017

2017-05-02 Thread Martin Alfke
Sorry, this is for German speaking people only.


Puppet Workshop - Frankfurt/Main - 17. Mai 2017

Puppet und example42 GmbH laden zu einem kostenfreien ganztägigen 
Puppet-Workshop ein.

Der Workshop findet am 17. Mai 2017 von 09:00 bis 18:00 Uhr im Sheraton 
Frankfurt Airport Hotel & Conference Center statt und richtet sich an 
Administratoren, die Puppet kennenlernen wollen oder bereits erste Erfahrungen 
gemacht haben. Der Workshop wird von Martin Alfke, example42 GmbH, in deutscher 
Sprache durchgeführt.

Bitte bei der Anmeldung angeben, welches Thema gewünscht wird.
Zur Auswahl stehen:
- Puppet Best Practice
- Puppet Code Testing
- Puppet und Integration in eine bestehende Infrastruktur

Für den Workshop muss ein Laptop mitgebracht werden.
System Voraussetzungen:
- eine VM mit einem Linux System (CentOS oder Ubuntu oder SLES) unter 
VirtualBox oder VMware
- Vagrant installation auf dem Laptop
- mindestens 2 GB RAM
- mindestens 10 GB freier Festplattenplatz

Melden Sie sich hier an: 
https://docs.google.com/a/puppet.com/forms/d/e/1FAIpQLSc0m82EVBsJTSpUFp7TYkqEThOaou7OesLuNBFUxsmD0jjEew/viewform?c=0&w=1

Die Anzahl der Plätze ist begrenzt, also nicht lange zögern.

Viele Grüße,
Martin

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


Re: [Puppet Users] Controlling Puppet class execution order with parameters.

2017-05-24 Thread Martin Alfke
Hi Harish,

import is deprecated in Puppet 4!

You can use require:

class 3 {
  require class1
  require class2
  …
}

Best,
Martin

> On 24 May 2017, at 17:57, Harish Kothuri  wrote:
> 
> Hi,
> 
> I have 3 classes and i need to execute class 3 only when class 1 and class 2 
> completes. All of these classes must be attached to a host.
> 
> class1($version='1.1.1'){
>.
>.
>.
> }
> class2($version='2.2.2'){
>.
>.
>.
> }
> 
> and 
> 
> class3(){
> import class1
> import class2
>
> exec{ 'something':
>   cmd => 'some command here',
>   before => [Class['class1'], Class['class2']]
> }
> }
> 
> When i try to apply the above relation, i get the following error
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Duplicate declaration: Class[class1] is already declared; cannot re declare 
> on node machine.domain.com
> 
> Can any one guide me how to handle this scenario?
> 
> 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/5e5d0f57-5df3-43f5-8d96-48896ed258b2%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/C77D5382-0B73-44B9-831B-D71699ECA317%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet for managing laura devices or any embedded devices .

2017-05-24 Thread Martin Alfke
Hi Fairouz,

in general Puppet can manage everything which has an IP address.
Well, mostly everything:
1. Puppet agent requires ruby with openssl support being available for the 
device.
Besides this: Puppet needs facter (a c++ application)
Ruby version depends on Puppet version. At the moment Puppet 4.10 uses Ruby 
2.1.9.
2. Puppet needs to know how to run commands on the device.
In Puppet we call this the “provider”. A provider is ruby code that has the 
logic on how to add, remove or change a resource (like user, group, file,…)
 
Wether you can directly use Puppet on a device depends on the underlying OS. If 
this is based on a standard Linux distribution possibility is high that one can 
make Puppet work on that device. Adoptions to Puppet and Facter code might be 
required.

Best,
Martin

> On 24 May 2017, at 13:49, Fairouz el ouazi  wrote:
> 
> Hi , 
> 
> My project consist of integrating a new device management  on a IOT platform .
> My IOT platform already has a  simple device management but with less options 
> and functionalities  for example  we can do groupping for changing parametres 
> of many devices at the same time , we don't have auto-provioning 
> My job is to find a new device management  that can communicate with my 
> platform and do the functionalities that the existent can't do .
> 
> I want to know if Puppet is the right choice ? and if  Puppet can manage the 
> embedded devices with no IP address ..
> 
> I really need help so plz if someone has any ideas 
> 
> -- 
> 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/1a74a1aa-bdbd-444b-9e56-054cb570b09a%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/8ACA0C7E-B981-4522-9BA9-9165748E1C91%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] migrating from calling_* in hiera 3 to hiera 5

2017-05-24 Thread Martin Alfke
Hi Rudy,

I don’t know whether someone already replied.
https://docs.puppet.com/puppet/4.10/hiera_migrate_v3_yaml.html#remove-hierarchy-levels-with-callingmodule-and-friends

Quote from the link:

Remove hierarchy levels with calling_module and friends

Hiera 3 could use three special pseudo-variables (which weren’t available in 
Puppet code) in its hierarchy:

• calling_module
• calling_class
• calling_class_path
Hiera.yaml version 5 doesn’t support these, so you must drop any hierarchy 
levels that interpolate them.

These variables were added to support a hacky predecessor of module data; 
anything you were doing with them is better accomplished with the module layer.

Martin

> On 16 May 2017, at 11:36, Rudy Gevaert  wrote:
> 
> And to add the current hiera.yaml (3)
> 
> # Managed with Puppet
> ---
> :backends:
>   - eyaml
>   - yaml
> :yaml:
>   :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
> :eyaml:
>   :extension: 'yaml'
>   :datadir: "/etc/puppetlabs/code/environments/%{::environment}/hieradata"
>   :pkcs7_private_key: /etc/puppetlabs/eyaml/private_key.pkcs7.pem
>   :pkcs7_public_key:  /etc/puppetlabs/eyaml/public_key.pkcs7.pem
> :hierarchy:
>   - "nodes/%{::trusted.certname}"
>   - "application_tier/%{::application_tier}/%{calling_class}"
>   - "application_tier/%{::application_tier}/%{calling_module}"
>   - "application_tier/%{::application_tier}"
>   - "classes/%{calling_class}"
>   - "modules/%{calling_module}"
>   - "environment/%{::environment}"
>   - "serverbeheer"
>   - "common"
> 
> 
> 
> On Tuesday, May 16, 2017 at 11:31:23 AM UTC+2, Rudy Gevaert wrote:
> Hallo,
> 
> Now that I have upgraded to the latest Puppet version I have the task to 
> upgrade our hiera setup.
> 
> Unfortunately we are heavily using calling_class and calling_module in our 
> setup.  And although the documentation says currently hiera5 is backward 
> compatible.  This doesn't work anymore.
> 
> I would like to know how I can easily upgrade to hiera5 without needing to 
> change all the lookups at once.
> 
> Is there any way to do that?  Or shall I need to do this all at once?
> 
> For now it seems impossible to have a situation that I can work in a branch 
> to test things about.  Because to change to Hiera5, (and so being able to 
> test the new system) I immediately remove my ability to leave calling_* in 
> the global hiera config.
> 
> Thanks in advance,
> 
> Rudy
> 
> 
> -- 
> 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/a2fc367f-b591-49fa-b810-a0af926a0d7c%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/46C84447-12E9-4229-93E9-0F3992D2DD62%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet works on 41 times out of 43. Help?

2017-06-22 Thread Martin Alfke

> On 22 Jun 2017, at 15:42, jcbollinger  wrote:
> 
> 
> So why not go with that?  The link owner is relevant only to modifying or 
> removing the link itself, and since you're managing it via Puppet, I don't 
> see what purpose it serves to relax the permissions for that.  The link owner 
> and permissions have no relevance to traversing the link (see symlink(7)).

E.g. postgres does not work when the data dir is a link not owned by the 
postgres user

Martin

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


Re: [Puppet Users] Puppet external CA Vs Puppet CA

2017-08-11 Thread Martin Alfke
Hi,
> On 10. Aug 2017, at 17:25, DJ  wrote:
> 
> Hello,
> 
> I want to know what is recommended way for puppet CA, is internal Puppet CA 
> works or if we have company standard CA we should use that, can anyone 
> highlight pros and cons of each method ?

There is plenty of documentation:
https://docs.puppet.com/puppet/5.0/config_ssl_external_ca.html 

https://docs.puppet.com/puppetserver/5.0/external_ca_configuration.html 


Most setups which I have seen are using an intermediate CA on the Puppet Server.

hah,
Martin

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


Re: [Puppet Users] revoke / delete node certificate from puppet ca remotely?

2017-08-17 Thread Martin Alfke

> On 17 Aug 2017, at 14:23, Jason McMahan  wrote:
> 
> Good morning,
> We installed a puppet agent on our citrix mgmt servers. 
> The problem became that the way it is done a golden image is used, 
> server_dev. Once sealed that spins off multiple other servers for stage and 
> prod environments.
> 
> We want to know about the servers, ensure they are in configuration and not 
> drifting between rebuilds and keep reports for a history on them.
> 
> The idea was to once they are done stop the service (not disable), delete the 
> ssl directory, then revoke and delete the cert on the puppetca.
> 
> 
> Has anyone else attempt to revoke and delete cert remotely from the puppetca?
> 
> We are attempting a curl command like 
> curl -X DELETE   --tlsv1   --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem   
> --cert /etc/puppetlabs/puppet/ssl/certs/server.pem--key 
> /etc/puppetlabs/puppet/ssl/private_keys/server.pem   -H "Accept: 
> application/json"   -H "Content-Type: application/json"   -d 
> '{"desired_state":"revoked"}'   
> https://puppetcat:8140/puppet-ca/v1/certificate_status/server?environment=production
> 
> But everytime we get forbidden 403 whether running curl command from remote 
> server or even the puppetca itself. 
> Attemped to add ip to  /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf 
> as well as /etc/puppetlabs/puppetserver/conf.d/ca.conf but still same error.

You must allow access to puppet ca api via auth.conf

Check the following links:
https://docs.puppet.com/puppet/5.0/config_file_auth.html
https://docs.puppet.com/puppetserver/latest/config_file_auth.html

hth,
Martin

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


Re: [Puppet Users] Packages via puppet

2014-10-21 Thread Martin Alfke
The package provider has a response file attribute.

puppet describe package:

- **responsefile**
A file containing any necessary answers to questions asked by
the package.  This is currently used on Solaris and Debian.  The
value will be validated according to system rules, but it should
generally be a fully qualified path.

hth,

Martin


On 21 Oct 2014, at 12:39, AAB !!  wrote:

> Hi,
> Many packages have many questions during installation, how can I answer those 
> when installing them via puppet ?
> apt-get install xyz has many question about the package I am installing, how 
> would I do it via puppet ?
> 
> 
> 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/f045886e-74f9-4ca5-bb18-e68a8e0b3913%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/DDBB4E78-3C1E-4C4C-8272-74D50190BC9C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet parser order random

2014-12-11 Thread Martin Alfke
You need to set an dependency for ntp::params and ntp::install to be processed 
in strict order.
e.g.
Class[‘::ntp::params’] -> Class[‘::ntp::install’]

hth,

Martin

On 11 Dec 2014, at 04:24, 巨海录  wrote:

> # ntp/manifests/init.pp
> class ntp (
>   $var_01 = '/etc/ntp.conf',
>   $var_02 = 'ntp/ntp.conf.erb',
> ) {
>   include ::ntp::params
>   include ::ntp:install
> }
> 
> # ntp/manifests/params.pp
> class ntp::params {
>   $var_03 = 'no.3'
>   $var_o4 = 'no.4'
> }
> 
> # ntp/manifests/install.pp
> class ntp::install {
>   notify {"var_01 == ${ntp::var01}": }
>   notify {"var_01 == ${ntp::var02}": }
>   notify {"var_03 == ${ntp::params::var_03}": }
>   notify {"var_04 == ${ntp::params::var_04}": }
> }
> 
> # site.pp
> include ntp
> 
> and i run this cmmand:
> 
> puppet apply site.pp
> 
> how puppet program parser these code in order?
> 
> because sometime i can't get the correct value of var_03 and var_04.  and 
> they would all be nil.
> 
> -- 
> 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/1178e436-af54-4381-bfc9-ad96ea1cedb4%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/8B995118-1C29-4A95-AE48-C7DD516A9256%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Notification for new Certificate request

2014-12-11 Thread Martin Alfke

On 10 Dec 2014, at 17:34, David Hollinger  wrote:

> Is there a way to setup email notifications for Certificate Requests and only 
> certificate requests? 
> 
> I'm sure tagmail would work to some extent, but I don't want notifications 
> for everything, just for Certificate/Node Requests

At one of my projects we had a cron job looking for output from puppet cert list
AFAIK there is no cert sign request notification directly built into puppet.

- Martin

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


Re: [Puppet Users] Styling parameter and variable types

2014-12-11 Thread Martin Alfke
Hi Daniele,

many thanks for bringing up the Type style question.

On 10 Dec 2014, at 14:23, Daniele Sluijters  wrote:

> With the future parser we can now add type annotations to a whole bunch of 
> things. Usually it's pretty easy, just chuck the type in front of the 
> variable and you're done. But what if you have multiple variables or class 
> parameters beneath each other, do we align them, how do we align them, and 
> what about more complex type definitions?

> […]

> Should we break up complex type definitions:
> 
> class test (
>   String   $param1,
>   String   $param2,
>   Integer  $param3,
>   Variant[String, Integer] $param4 = 80,
>   Struct[{
> a => Enum[hi, there, everyone]
> b => Optional[Variant[
> Enum[yo, lo],
> Integer[2]]]
>   }]   $param5 = { a => 'hi', },
> ) {}
> 
+1 for this example.
(I would prefer less whitespaces on the Optional part of the Struct.)

Do we have other examples available which would argue against a style like this 
one?


> I like this last one best. It limits the length of the line and by splitting 
> up the type definition according to the type we're defining (a hash) it 
> becomes fairly easy for a human to parse. But then, should the Variant after 
> the Optional be on a new line already or only the arguments to Variant since 
> that one can take multiples (like in the way you'd break up an array over 
> multiple lines) etc. etc. etc. I'm still not entirely happy about all the 
> white spacing between the type and the actual variable name but I do like the 
> columnar view it creates.
> 
> Eventually we'll be able to create/alias our own types which should limit the 
> amount of crazy before a variable or parameter definition but until then, 
> what do we do? And once we have the ability to create/alias our own types, 
> how do we style those?
> 
> We don't have to agree on a "it must be done exactly this anal way" but a 
> loose consensus about what it could look like would be useful.

ACK.

-- 
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/FB857CFA-7061-4782-BF65-448C57EC5901%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Client self-deregistration from PuppetDB

2014-12-11 Thread Martin Alfke
Hi Matt,
On 09 Dec 2014, at 19:58, Matt Wise  wrote:

> We boot up/shut-down 50-100 hosts a day on average... we're exploring 
> PuppetDB, but I'm concerned about the model of just 'waiting' for hosts to be 
> purged based on some checkin time. Is there any way to have our hosts send a 
> signal through the puppet-masters (or directly to puppetdb?) to purge 
> themselves when they're being terminated?

You can use the puppetdb rest api:
https://docs.puppetlabs.com/puppetdb/2.2/api/index.html

In my actual project we disable hosts via VM management system using this API.
Works like a charm.

hth,

Martin

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


Re: [Puppet Users] puppet parser order random

2014-12-11 Thread Martin Alfke

On 11 Dec 2014, at 14:56, jcbollinger  wrote:

> 
> 
> On Thursday, December 11, 2014 2:24:11 AM UTC-6, Martin Alfke wrote:
> You need to set an dependency for ntp::params and ntp::install to be 
> processed in strict order. 
> e.g. 
> Class[‘::ntp::params’] -> Class[‘::ntp::install’] 
> 
> 
> 
> NO.
> 
> This is an unfortunately common and persistent misconception.  The chaining 
> operators and the relationship metaparameters influence the order in which 
> classes and resources are applied on the target machine.  They have NO EFFECT 
> WHATSOEVER on the order in which declarations are evaluated during catalog 
> building.

Argh. Yes. You are absolutely right.
Sorry.

-- 
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/BA76D06D-0AA8-49CD-82E2-1C70CE013657%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to solve $concat_basedir not defined error?

2014-12-15 Thread Martin Alfke
AFAIK pluginsync needs to be set on the agents.
On the Master you need to install the module
 - puppet module install puppetlabs/concat

On the agent you need at least one puppet agent run to synchronize the required 
concat scripts.
If you run in hoop mode only, concat will always fail due to missing scripts.

> On 15.12.2014, at 09:33, Pete Brown  wrote:
> 
> Where did you set pluginsync = true?
> It needs to be in the master section of the puppet.conf on your puppet master.
> 
> Which version of puppet, facter, hiera and the concat module are you using?
> 
> On 13 December 2014 at 08:26, Haani Niyaz  wrote:
>> Thanks for the info.
>> 
>> `facter concat_basedir` returns empty.
>> 
>> `puppet plugin download` returns 'no plugins downloaded.'
>> 
>> 
>> 
>> 
>> 
>> On Saturday, 13 December 2014 06:27:55 UTC+11, Hunter Haugen wrote:
>>> 
>>> The concat_basedir custom fact comes from the concat module
>>> https://forge.puppetlabs.com/puppetlabs/concat so on the agent, if you can
>>> run `facter concat_basedir` then puppet should be able to pick it up.
>>> 
>>> It looks like you do have the concat module installed at
>>> /etc/puppet/modules/concat, and if you have pluginsync turned on (which is
>>> on by default, fwiw) then I'm not really sure what could be the hang-up.
>>> 
>>> What does running `puppet plugin download` on the agent do? Does it fix
>>> the issue?
>>> 
>>> 
>>> 
>>> -Hunter
>>> 
>>> On Fri, Dec 12, 2014 at 2:24 AM, Haani Niyaz  wrote:
 
 Hi there,
 
 I'm fairly new to puppet I am attempting to setup a dashboard for
 puppetdb. I came across puppetexplorer and wanted to trial it out.
 
 I attempted to install puppetexplorer  by doing the following:
 
 puppet module install spotify-puppetexplorer
 
 
 #Added puppetexplorer to my puppet node declaration
 
 
 node 'puppet' {
  include 'puppetexplorer'
 }
 
 
 
 On running the agent on the master to install puppetexplorer I get the
 following error (running it as root):
 
 
 
 
 Error: Could not retrieve catalog from remote server: Error 400 on
 SERVER: $concat_basedir not defined. Try running again with pluginsync=true
 on the [master] and/or [main] section of your node's
 '/etc/puppet/puppet.conf'. at
 /etc/puppet/modules/concat/manifests/setup.pp:20 on node puppet.example.com
 
 
 
 I already tried setting pluginsync=true and however it does not make a
 difference. Can someone hint at what might be the problem?
 
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/30b064e2-c85b-42fe-b2e2-e0a2324cd3fd%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/a0c06a9c-5c17-4fb3-b322-d05b6e56496f%40googlegroups.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Pete Brown
> Director and Primary Systems Engineer
> Abstract IT Pty Ltd.
> 
> -- 
> 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/CAM8R_x8txjAPZyZQYyU4pKKpnGx%2BiaRKMXP09%2Bceq00_Byvv5Q%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/F038EBAF-24EA-4667-9BAF-0E847B3549A0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Did PE 3.7 kills r10k?

2014-12-27 Thread Martin Alfke
Hi Vadym,

the PE node classifier is an ENC.
This ENC sets environments per nodes as an authority. Nodes can no longer 
switch their environments if you use an ENC with environment parameters set.

You still have the technical possibility to continue using manifests based node 
classification and therefor you can continue using r10k.
You will only loose the environment enforcement via ENC.

hth,

Martin


On 27 Dec 2014, at 00:38, Vadym Chepkov  wrote:

> Hi,
> 
> I really hope I am mistaken, but it seems you can't use r10k with it's full 
> potential anymore in Puppet Enterprise 3.7.
> 
> In the past (PE3.3) I could create any branch, feature_something, in git 
> repository. r10k would create a branch/environment​ ​and I​ could​ ​apply it 
> from the command line on some development host, i.e.
> 
> puppet agent -t --environment=feature_something
> 
> Now, according to puppetlabs support, "console node classifier being the 
> definitive and authoritative environment-setter", so I can't do that anymore.
> This seems like a major setback and a deal breaker for me. Does anybody else 
> use environments this way?​ ​Why even have --environment switch altogether if 
> I can't select anything besides what is set in the console.
> 
> What are other choices except ditching PE altogether?
> 
> Thanks,
> Vadym
> 
> -- 
> 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%2BQfOKiQG%2BZd-kt_U1tcvOrK2yE9-JXR9P0jZYM%2Bdhp_6Q8NRA%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/01F337DE-7CE8-4451-AA92-90A4AC3489CC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Use ftp as source for file

2014-12-27 Thread Martin Alfke
Hi,

instead of using exec’s you might want to dig into existing modules and their 
defines, types and providers:

https://github.com/camptocamp/puppet-archive
https://github.com/maestrodev/puppet-wget

When using exec resources you have to ensure by yourself that the exec runs 
only in case of changes needed.
An exec should not get executed on every puppet agent run.

hth,

Martin

On 26 Dec 2014, at 20:42, Felix Frank  wrote:

> Hi,
> 
> support for HTTP is a long standing feature request.
> 
> https://tickets.puppetlabs.com/browse/PUP-1072
> 
> It's currently work in progress, you can expect it in version 4.1,
> perhaps even 4.0. As for FTP, I'm a little doubtful that support will go
> mainline any time soon, or at all.
> 
> In the meantime, a common workaround can be implemented using `exec`,
> roughly:
> 
> $file = '/home/user1/conf/tempconf1.xml'
> $url = 'ftp://192.168.209.23/temp'
> exec {
>  "get-$file":
>command => "/path/to/ftpclient $url -o $file",
>creates => $file,
> }
> 
> Please note that the URL should use but two slashes after the colon,
> seeing as it includes a host address.
> 
> HTH,
> Felix
> 
> On 12/26/2014 12:32 PM, Илья Захаров wrote:
>> Hi there! I want to get files which are missing on the nodes on FTP
>> 
>> So for test i write something like this:
>> 
>> file { '/home/user1/conf/tempconf1.xml' :
>>  ensure => present,
>>  source => 'ftp:///192.168.209.23/temp',
>> }
>> 
>> and i have a error "Cannot use URLs of type 'ftp' as source for
>> fileserving"
>> 
>> So what does i need to do that i can use "http" or "ftp" source for
>> files ??
>> 
>> 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/549DBA29.1090105%40Alumni.TU-Berlin.de.
> 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/C4180D16-1C7D-45AC-94F9-8C2ABE74C30B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] selinux / selboolean error

2014-12-27 Thread Martin Alfke
Hi Paul,

some more insight:

if $::selinux

is true if the variable exists and does not contain the bool value ‘false’

Facter returns a string and therefor the if$var will always apply.

You have two possibilities:
1. like Johan mentioned:
Check for the proper value:
if $::selinux == ‘true’

2. modify the string prior testing:
if str2bool($::selinux)

str2bool is a function from std lib.

hth,

Martin

On 26 Dec 2014, at 19:32, Johan De Wit  wrote:

> facter returns strings, and "false" (the string) evaluates to true.
> 
> if $selinux == "true" ??
> 
> On 26/12/14 17:01, Sebastian Otaegui wrote:
>> When you run facter on the node do you get the right value?
>> 
>> On Tuesday, December 23, 2014, Paul Raines  wrote:
>> In the manifest/init.pp of a module I am writing in puppet 3.6.2 I have
>> 
>> if $selinux {
>>selboolean { 'authlogin_nsswitch_use_ldap':
>>  persistent => true,
>>  value => on,
>>}
>> }
>> 
>> How when this runs on machine with selinux disabled (facter clearly shows 
>> $selinux is false), the selboolean still seems to get evaluated resulting in 
>> the error
>> 
>> Error: /Stage[main]/Nmr_ldap/Selboolean[authlogin_nsswitch_use_ldap]: Could 
>> not evaluate: Execution of '/usr/sbin/getsebool authlogin_nsswitch_use_ldap' 
>> returned 1: /usr/sbin/getsebool:  SELinux is disabled
>> 
>> 
>> So it seems like it is ignoring the if $selinux entirely.  Is this a bug in 
>> puppet or am I missing something?
>> 
>> 
>> -- 
>> 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/3b045b98-53a6-477a-96fc-1ea5f1f635f6%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> -- 
>> Those who do not understand Unix are condemned to reinvent it, poorly.
>> Any sufficiently recent Microsoft OS contains an ad hoc, 
>> informally-specified, bug-ridden, slow implementation of half of Unix.
>> -- 
>> 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/CAApMPgxqrLsivqBdeYyUNwHQK%2BOC55sgcc7KCFtadP%2BoA2Cqzg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> Johan De Wit
> 
> Open Source Consultant
> 
> Red Hat Certified Engineer  (805008667232363)
> Puppet Certified Professional 2013/2014 (PCP006)
> _
>  
> Open-Future Phone +32 (0)2/255 70 70
> Zavelstraat 72  Fax   +32 (0)2/255 70 71
> 3071 KORTENBERG Mobile+32 (0)474/42 40 73
> BELGIUM 
> http://www.open-future.be
> 
> _
>  
> 
> 
> Upcoming Events:
> 
> Zabbix Certified Specialist | 
> http://www.open-future.be/zabbix-certified-professional-training-8th-till-9th-janaury
> 
> Zabbix Certified Professional | 
> http://www.open-future.be/zabbix-certified-professional-training-8th-till-9th-janaury
> 
> Bacula Administrator 1 | 
> http://www.open-future.be/bacula-administrator-i-training-13th-till-15th-january
> 
> Puppet Fundamentals | 
> http://www.open-future.be/puppet-fundamentals-training-26th-till-28th-january
> 
> Puppet Architect | 
> http://www.open-future.be/puppet-architect-training-29th-till-30th-january
> 
> Subscribe to our newsletter: http://eepurl.com/BUG8H
> 
> 
> 
> -- 
> 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/549DA9CB.20501%40open-future.be.
> 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/42F69516-DD40-447A-8DB6-8E865A1C4713%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet - packages long runtime

2015-01-05 Thread Martin Alfke
Hi,
On 05 Jan 2015, at 07:50, Royee Tager  wrote:

> Hello all,
> 
> New CentOS 6.5 clients which run Puppet for the first time have many packages 
> to install.
> As you can see below the total runtime is 355.0697 sec.
> The package part takes 262.6 sec.
> Is it somehow possible to reduce that time?

Did you measure the time for manual installation?
I assume that the timing is similar.
You can speed package installation by installing a local repo mirror and 
disable the fastest mirror option.

hth,

Martin



> 
> 
> config_retrieval  6.464
> cron  0.0105
> exec  49.8922
> file  33.3775
> file_line 0.0192
> mount 0.1564
> package   261.6271
> service   3.2403
> ssh_authorized_key0.0068
> yumrepo   0.2743
> Total 355.0697
> 
> -- 
> 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/15a5de74-2bc9-4627-ae37-82865dae9d1b%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/D298D66E-3E1D-4D98-B61F-660FB7126D11%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Hiera doesn t behave as expected or as written in doc

2015-01-08 Thread Martin Alfke
Hi,
> On 08.01.2015, at 09:52, Raphael  wrote:
> 
> Hi,
> I have a working puppetmaster installed from package on an ubuntu server 
> 14.04 64bits.
> I've been struggeling for a while now with hiera to achieve what it is 
> written in the doc ;
> 
> My hiera version is 1.3.0
> Puppetmaster version 3.4.3
> 
> My hierachy settings is quite simple, with a common file and a specific file 
> for host : 
> 
> ---
> :backends:
>   - yaml
>   - json
> :yaml:
>   :datadir: /etc/puppet/hieradata
> :json:
>   :datadir: /etc/puppet/hieradata
> :hierarchy:
> 
>   - common
>   - "node/%{::fqdn}"
> 
> :merge_behavior: deeper
> 
> This file is in /etc/puppet/ and linked to /etc/hiera.yaml
> 
> In the common.yaml, I'm trying to use a variable based on facts (like in the 
> example on the official documentation) :
> 
> 
> smtpserver: "mail.%{::domain}"
> 
> When I issue hiera smtpserver, I have this output :
> 
> mail.

You are running the hiera command on cli?
In this case you do not have facts available.
But: you can provide facts on cli:

hiera -c /etc/hiera.yaml smtpserver domain=foobar.com 

hth,

Martin

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


Re: [Puppet Users] Hiera doesn t behave as expected or as written in doc

2015-01-08 Thread Martin Alfke
When using cli you want to tell hiera to look up all hashes:

hiera -h site_users fqdn=myhost

On 08 Jan 2015, at 17:02, Raphael  wrote:

> Oh yeah ! Sorry for this noise ! The manifest on my nodes applyed properly 
> ... and I've got the the proper output from cli with the facts provided.
> 
> Regarding the lookup, here what I have :
> 
> Based on https://docs.puppetlabs.com/hiera/1/lookup_types.html
> 
> hiera site_users
> {"bob"=>{"uid"=>501, "shell"=>"/bin/bash"},
>  "ash"=>{"uid"=>502, "shell"=>"/bin/zsh", "group"=>"common"}}
> 
> 
> hiera site_users ::fqdn=myhost
> {"jen"=>{"uid"=>503, "shell"=>"/bin/zsh", "group"=>"deglitch"},
>  "bob"=>{"uid"=>1000, "group"=>"deglitch"}}
> 
> My hiera.yaml settings :
> 
> :hierarchy:
> 
>   - "node/%{::fqdn}"
>   - common
> 
> :merge_behavior: deeper
> 
> What did I miss ?
> 
> 
> 
> Le jeudi 8 janvier 2015 15:23:10 UTC+1, Johan De Wit a écrit :
> Hi Raphael, 
> hiera smtpserver domain=example.com
> 
> 
> That should work.  If using hiera from CLI, you need to provide the facts etc 
> also.
> 
> See the docs : 
> https://docs.puppetlabs.com/hiera/1/command_line.html
> 
> hth 
> 
> johan
> 
> 
> On 08/01/15 09:52, Raphael wrote:
>> Hi,
>> I have a working puppetmaster installed from package on an ubuntu server 
>> 14.04 64bits.
>> I've been struggeling for a while now with hiera to achieve what it is 
>> written in the doc ;
>> 
>> My hiera version is 1.3.0
>> Puppetmaster version 3.4.3
>> 
>> My hierachy settings is quite simple, with a common file and a specific file 
>> for host : 
>> 
>> ---
>> :backends:
>>   - yaml
>>   - json
>> :yaml:
>>   :datadir: /etc/puppet/hieradata
>> :json:
>>   :datadir: /etc/puppet/hieradata
>> :hierarchy:
>> 
>>   - common
>>   - "node/%{::fqdn}"
>> 
>> :merge_behavior: deeper
>> 
>> This file is in /etc/puppet/ and linked to /etc/hiera.yaml
>> 
>> In the common.yaml, I'm trying to use a variable based on facts (like in the 
>> example on the official documentation) :
>> 
>> 
>> smtpserver: "mail.%{::domain}"
>> 
>> When I issue hiera smtpserver, I have this output :
>> 
>> 
>> mail.
>> 
>> Even the lookup type (deeper here in my config) doesn t provide the same 
>> output as the example ...
>> 
>> Any idea ? version issue ?
>> 
>> Thx a lot for your advice / answer.
>> 
>> -- 
>> 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/3590c684-299f-4775-a12a-f241ab06f75d%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> Johan De Wit
> 
> Open Source Consultant
> 
> Red Hat Certified Engineer  (805008667232363)
> Puppet Certified Professional 2013/2014 (PCP006)
> blog : 
> http://johan.koewacht.net/
> 
> __
> ___
>  
> Open-Future Phone +32 (0)2/255 70 70
> Zavelstraat 72  Fax   +32 (0)2/255 70 71
> 3071 KORTENBERG Mobile+32 (0)474/42 40 73
> BELGIUM 
> http://www.open-future.be
> 
> __
> ___
>  
> 
> 
> Upcoming Events:
> 
> Zabbix Certified Specialist | 
> http://www.open-future.be/zabbix-certified-professional-training-8th-till-9th-janaury
> 
> Zabbix Certified Professional | 
> http://www.open-future.be/zabbix-certified-professional-training-8th-till-9th-janaury
> 
> Bacula Administrator 1 | 
> http://www.open-future.be/bacula-administrator-i-training-13th-till-15th-january
> 
> Puppet Fundamentals | 
> http://www.open-future.be/puppet-fundamentals-training-26th-till-28th-january
> 
> Puppet Architect | 
> http://www.open-future.be/puppet-architect-training-29th-till-30th-january
> 
> Subscribe to our newsletter: http://eepurl.com/BUG8H
> 
> 
> 
> -- 
> 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/1f7b7077-33bd-4511-bb81-39696c2b%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/8F175A26-EF5B-4D75-A16A-D704B9A6F7F9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Hiera doesn t behave as expected or as written in doc

2015-01-08 Thread Martin Alfke

On 08 Jan 2015, at 17:12, Raphael  wrote:

> Hi Martin,
> thx for this quick answer :]
> 
> When in puppet you use hiera_hash, the behaviour is the same as the -h option 
> in cli ?

Yes.
CLI <-> Puppet:

hiera -a <-> hiera_array(…)
hiera -h <-> hiser_hash(…)
hiera <-> hiera(…)

> 
> Le jeudi 8 janvier 2015 17:09:32 UTC+1, Martin Alfke a écrit :
> When using cli you want to tell hiera to look up all hashes: 
> 
> hiera -h site_users fqdn=myhost 
> 
> On 08 Jan 2015, at 17:02, Raphael  wrote: 
> 
> > Oh yeah ! Sorry for this noise ! The manifest on my nodes applyed properly 
> > ... and I've got the the proper output from cli with the facts provided. 
> > 
> > Regarding the lookup, here what I have : 
> > 
> > Based on https://docs.puppetlabs.com/hiera/1/lookup_types.html 
> > 
> > hiera site_users 
> > {"bob"=>{"uid"=>501, "shell"=>"/bin/bash"}, 
> >  "ash"=>{"uid"=>502, "shell"=>"/bin/zsh", "group"=>"common"}} 
> > 
> > 
> > hiera site_users ::fqdn=myhost 
> > {"jen"=>{"uid"=>503, "shell"=>"/bin/zsh", "group"=>"deglitch"}, 
> >  "bob"=>{"uid"=>1000, "group"=>"deglitch"}} 
> > 
> > My hiera.yaml settings : 
> > 
> > :hierarchy: 
> > 
> >   - "node/%{::fqdn}" 
> >   - common 
> > 
> > :merge_behavior: deeper 
> > 
> > What did I miss ? 
> > 
> > 
> > 
> > Le jeudi 8 janvier 2015 15:23:10 UTC+1, Johan De Wit a écrit : 
> > Hi Raphael, 
> > hiera smtpserver domain=example.com 
> > 
> > 
> > That should work.  If using hiera from CLI, you need to provide the facts 
> > etc also. 
> > 
> > See the docs : 
> > https://docs.puppetlabs.com/hiera/1/command_line.html 
> > 
> > hth 
> > 
> > johan 
> > 
> > 
> > On 08/01/15 09:52, Raphael wrote: 
> >> Hi, 
> >> I have a working puppetmaster installed from package on an ubuntu server 
> >> 14.04 64bits. 
> >> I've been struggeling for a while now with hiera to achieve what it is 
> >> written in the doc ; 
> >> 
> >> My hiera version is 1.3.0 
> >> Puppetmaster version 3.4.3 
> >> 
> >> My hierachy settings is quite simple, with a common file and a specific 
> >> file for host : 
> >> 
> >> --- 
> >> :backends: 
> >>   - yaml 
> >>   - json 
> >> :yaml: 
> >>   :datadir: /etc/puppet/hieradata 
> >> :json: 
> >>   :datadir: /etc/puppet/hieradata 
> >> :hierarchy: 
> >> 
> >>   - common 
> >>   - "node/%{::fqdn}" 
> >> 
> >> :merge_behavior: deeper 
> >> 
> >> This file is in /etc/puppet/ and linked to /etc/hiera.yaml 
> >> 
> >> In the common.yaml, I'm trying to use a variable based on facts (like in 
> >> the example on the official documentation) : 
> >> 
> >> 
> >> smtpserver: "mail.%{::domain}" 
> >> 
> >> When I issue hiera smtpserver, I have this output : 
> >> 
> >> 
> >> mail. 
> >> 
> >> Even the lookup type (deeper here in my config) doesn t provide the same 
> >> output as the example ... 
> >> 
> >> Any idea ? version issue ? 
> >> 
> >> Thx a lot for your advice / answer. 
> >> 
> >> -- 
> >> 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/3590c684-299f-4775-a12a-f241ab06f75d%40googlegroups.com.
> >>  
> >> For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > -- 
> > Johan De Wit 
> > 
> > Open Source Consultant 
> > 
> > Red Hat Certified Engineer  (805008667232363) 
> > Puppet Certified Professional 2013/2014 (PCP006) 
> > blog : 
> > http://johan.koewacht.net/ 
> > 
> > __ 
> > ___ 
> >   
> > Open-Future Phone +32 (0)2/255 70 70 
> > Zavelstraa

Re: [Puppet Users] Error: Failed to parse template . Detail: Could not find value for 'serveraliases' at

2015-01-09 Thread Martin Alfke
Seems to be an issue with unscoped variable inside the template.
https://docs.puppetlabs.com/guides/templating.html#referencing-variables

Please switch to scoped variables in your template:

# OTRS Config
# MaxRequestsPerChild (so no apache child will be to big!)
MaxRequestsPerChild 4000

>
  ServerName <%= @name %>
<%if @serveraliases.is_a? Array -%>
<% @serveraliases.each do |name| -%><%= "  ServerAlias #{name}\n" %><% end -%>
<% elsif @serveraliases != '' -%>
<%= "  ServerAlias #{@serveraliases}" -%>
<% end -%>

hth,

Martin


On 09 Jan 2015, at 16:58, Craig White  wrote:

> Testing for errors is part of the erb game. Comment all of that out and put 
> in just <%= serveraliases -%> just to see what is written to the file.
> 
> In your case above, it seems you have accounted for whether serveraliases is 
> an array or empty but not a simple string which is probably what it is.
> 
> On Friday, January 9, 2015 at 8:41:20 AM UTC-7, Spriya wrote:
> Hi,
> 
> I am having this issue:
> 
> 
> Error: Failed to parse template otrs/vhost-otrs.conf.erb:
>   Filepath: 
> /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/parser/templatewrapper.rb
>   Line: 81
>   Detail: Could not find value for 'serveraliases' at 
> /etc/puppetlabs/puppet/modules/otrs/templates/vhost-otrs.conf.erb:7
>  at /etc/puppetlabs/puppet/modules/otrs/manifests/apache.pp:10 on node 
> dot-pap-spr-t03.ddc.dot.state.ma.us
> 
> 
> Here is my code manifests code:
> 
> class otrs::apache {
> 
>   include apache
> 
>   apache::vhost { $otrs::sitename:
> priority=> '01',
> docroot => '/var/www',
> port=> '80',
> serveraliases   => [ $::fqdn ],
> }
> }
> 
> Here is my template:
>  cat vhost-otrs.conf.erb
> # OTRS Config
> # MaxRequestsPerChild (so no apache child will be to big!)
> MaxRequestsPerChild 4000
> 
> >
>   ServerName <%= @name %>
> <%if serveraliases.is_a? Array -%>
> <% serveraliases.each do |name| -%><%= "  ServerAlias #{name}\n" %><% end -%>
> <% elsif serveraliases != '' -%>
> <%= "  ServerAlias #{serveraliases}" -%>
> <% end -%>
> 
> 
> Do any one knows  answer? I could not find the answer for this?
> 
> 
> -- 
> 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/3d6e89bc-f8e9-4708-89d2-6f3408f14299%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/181C06F1-FFC3-4080-81C4-CB29381645DD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Error: Failed to parse template . Detail: Could not find value for 'serveraliases' at

2015-01-10 Thread Martin Alfke
Hi,

> 
> class otrs::apache {
> 
>   include apache
> 
>   apache::vhost { $otrs::sitename:
> priority=> '01',
> docroot => '/var/www',
> port=> '80',
> serveraliases   => [ $::fqdn ],
> content=> template('otrs/vhost-otrs.conf.erb'),
>   }
> 
> Error: Invalid parameter content at 
> /etc/puppetlabs/puppet/modules/otrs/manifests/apache.pp:11 
> 

Are you using puppetlabs-apache module or have you written the apache::ghost 
define by yourself?
Check that the define knows about the parameter content.

Puppetlabs-apache ghost define does not have the content attribute.
They switched to concat module and small template snippets.
https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/vhost.pp

- Martin

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


Re: [Puppet Users] update package with condition

2015-01-15 Thread Martin Alfke
Hi,

with RH6 you can use yum provider and set ensure to latest.
(Maybe you need to create a yum repo for your factor package).

hth,

Martin

On 14 Jan 2015, at 18:34, puppetstan  wrote:

> Hi,
> 
> I would like to update the package facter on all of my servers. (I can not 
> use INSTALL_OPTIONS because my puppet version is too old)
> 
> I added a condition--> if the package facter is installed AND if facter 
> version is not facter-1.7.6-1.el6.x86_64.rpm I install the package but I 
> think I have an error in my onlyif condition because it does not work.
> 
> Can you have an idea please?
> Thanks in advance
> 
> regards
> 
> 
> class paquet::redhat6-64 {
> 
> package {'facter':
>   provider => 'rpm',
> #  install_options => ['-Uvh'],
>   source => "/tmp/facter-1.7.6-1.el6.x86_64.rpm",
>   require => File["/tmp/facter-1.7.6-1.el6.x86_64.rpm"],
>   notify => Service["puppet"],
>   }
> 
>file { "/tmp/facter-1.7.6-1.el6.x86_64.rpm":
>source => "puppet:///modules/paquet/facter-1.7.6-1.el6.x86_64.rpm"
>}
> 
> exec {'rpm updates':
> command => '/bin/rpm -Uvh /tmp/facter-1.7.6-1.el6.x86_64.rpm',
> onlyif => "/bin/rpm -q facter and ('/usr/bin/facter -v' != 
> facter-1.7.6)",
> }
> 
> 
> -- 
> 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/d4289154-27d7-489d-adea-c452b4d6c767%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/8D42B17B-9A0D-4EAE-99B5-F19B6D264959%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] exec resource long runtime

2015-01-18 Thread Martin Alfke
The 48 seconds is the complete time the agent needs for the catalog.
Within the catalog you are running two commands:

spacewalk-channel -l and rhnreg.

Please add both execution times when comparing.

On 18 Jan 2015, at 08:29, Royee Tager  wrote:

> Hi, 
> 
> If I run the following command manually (time /usr/sbin/rhnreg_ks -v 
> --serverUrl=http://spacewalk.example.com/XMLRPC 
> --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> --nopackages --novirtinfo --norhnsd -v), the runtime is 15 seconds. However, 
> if the command is performed via the exe resource the runtime is ~48 seconds.
> 
> Why is the runtime via the exe resource longer?
> 
> Is it possible shorten the runtime?
> 
> class spacewalk::config inherits spacewalk {
> 
>   file { '/etc/yum/pluginconf.d/rhnplugin.conf':
> 
> ensure   => present,
> 
> source   => 'puppet:///modules/spacewalk/rhnplugin.conf',
> 
> owner=> root,
> 
> group=> root,
> 
> mode => '0644',
> 
> before   => Exec['register-client'],
> 
>   }
> 
>   exec { 'register-client':
> 
> command => "/usr/sbin/rhnreg_ks -v 
> --serverUrl=http://${::spacewalk::spacewalk_server_fqdn}/XMLRPC 
> --activationkey=${::spacewalk::activation_key} --force --nohardware 
> --nopackages --novirtinfo --norhnsd -v",
> 
> require => Class['spacewalk::install'],
> 
> unless  => '/usr/sbin/spacewalk-channel -l',
> 
>   }
> 
> }
> 
> 
> 
> Info: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: 
> Starting to evaluate the resource
> 
> Debug: Exec[register-client](provider=posix): Executing check 
> '/usr/sbin/spacewalk-channel -l'
> 
> Debug: Executing '/usr/sbin/spacewalk-channel -l'
> 
> Debug: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]/unless: 
> Unable to locate SystemId file. Is this system registered?
> 
> Debug: Exec[register-client](provider=posix): Executing '/usr/sbin/rhnreg_ks 
> --serverUrl=http://spacewalk.example.com/XMLRPC 
> --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> --nopackages --novirtinfo --norhnsd'
> 
> Debug: Executing '/usr/sbin/rhnreg_ks 
> --serverUrl=http://spacewalk.example.com/XMLRPC 
> --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> --nopackages --novirtinfo --norhnsd'
> 
> Notice: 
> /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]/returns: 
> executed successfully
> 
> Debug: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: The 
> container Class[Spacewalk::Config] will propagate my refresh event
> 
> Info: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: 
> Evaluated in 47.20 seconds
> 
> 
> 
> Thank you in advance,
> 
> 
> -- 
> 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/e7aa4d1b-3086-4705-ab83-65f2acf85714%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/F54FF072-9664-4EAF-B356-1E6582333CEF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Resource ordering syntax

2015-01-18 Thread Martin Alfke
When using an array on a resource title Puppet will internally create multiple 
resource declarations.

e.g.
when declaring like this:
package { [‘foo’, ‘bar’, ‘bas’]: ensure => present }

You can build references on each of the array elements:

require => Package[‘bas’]

see: 
https://docs.puppetlabs.com/puppet/latest/reference/lang_resources.html#array-of-titles

On 17 Jan 2015, at 15:13, Andrew Langhorn 
 wrote:

> Hi,
> 
> I have a syntax query, I hope that the group can help with.
> 
> When using resource ordering parameters, such as 'before' or 'require', I can 
> specify the resource on which to act the ordering around. For instance:
> 
> exec { 'wget-docker-key':
> command => '/usr/bin/wget -qO- https://get.docker.io/gpg | 
> /usr/bin/apt-key add -',
> before  => Exec['echo-docker-deb-apt-sources'],
> }
> 
> exec { 'echo-docker-deb-apt-sources':
> command => '/bin/echo deb http://get.docker.io/ubuntu docker main > 
> /etc/apt/sources.list.d/docker.list',
> creates => '/etc/apt/sources.list.d/docker.list',
>   }
> 
> This will ensure that the Docker key is installed on the machine before 
> create a list of Docker sources for Apt.
> 
> In situations where I'm using an array as the resource title, such as this:
> 
> package { [
>   "linux-image-extra-${::kernelrelease}",
>   'lxc',
>   'lxc-docker-1.0.0',
> ]:
>   ensure => present,
> }
> 
> How do I reference the resource when using resource ordering? Do I just use 
> Package['linux-image-extra-${::kernelrelease}",'lxc','lxc-docker-1.0.0']?
> 
> Thanks in advance!
> 
> -- 
> Andrew Langhorn
> Web Operations
> Government Digital Service
> 
> e: andrew.langh...@digital.cabinet-office.gov.uk
> a: 6th Floor, Aviation House, 125 Kingsway, London, WC2B 6NH
> 
> -- 
> 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/CANCa_WZ2Mp7A8PrAEvkK3DuuCks_3ptp1rCByhxxs1r%3DZ31iqQ%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/43CB4061-35A8-466C-B374-0FF718A5D716%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] exec resource long runtime

2015-01-18 Thread Martin Alfke
Please also keep in mind that puppet is doing more:

require => Class['spacewalk::install'], 

There is another class which also gets executed.

The 48 second is not only the command execution time.
Its the whole catalog apply time.
Puppet always checks whether it has do do something prior doing changes.
e.g. check file md5sum, owner and group and permissions.

hth,

Martin

On 18 Jan 2015, at 15:54, Royee Tager  wrote:

> Hi Martin,
> 
> Attached is the output of the commands:
> 
> [root@labit-lg02 ~]# time /usr/sbin/spacewalk-channel -l
> Unable to locate SystemId file. Is this system registered?
> 
> real  0m1.125s
> user  0m0.120s
> sys   0m0.055s
> [root@labit-lg02 ~]#
> 
> [root@labit-lg02 ~]# time /usr/sbin/rhnreg_ks 
> --serverUrl=http://spacewalk.example.com/XMLRPC 
> --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> --nopackages --novirtinfo --norhnsd
> warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: 
> NOKEY
> 
> real  0m15.558s
> user  0m9.997s
> sys   0m0.704s
> [root@labit-lg02 ~]#
> 
> בתאריך יום ראשון, 18 בינואר 2015 בשעה 15:46:38 UTC+2, מאת Martin Alfke:
> The 48 seconds is the complete time the agent needs for the catalog. 
> Within the catalog you are running two commands: 
> 
> spacewalk-channel -l and rhnreg. 
> 
> Please add both execution times when comparing. 
> 
> On 18 Jan 2015, at 08:29, Royee Tager  wrote: 
> 
> > Hi, 
> > 
> > If I run the following command manually (time /usr/sbin/rhnreg_ks -v 
> > --serverUrl=http://spacewalk.example.com/XMLRPC 
> > --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> > --nopackages --novirtinfo --norhnsd -v), the runtime is 15 seconds. 
> > However, if the command is performed via the exe resource the runtime is 
> > ~48 seconds. 
> > 
> > Why is the runtime via the exe resource longer? 
> > 
> > Is it possible shorten the runtime? 
> > 
> > class spacewalk::config inherits spacewalk { 
> > 
> >   file { '/etc/yum/pluginconf.d/rhnplugin.conf': 
> > 
> > ensure   => present, 
> > 
> > source   => 'puppet:///modules/spacewalk/rhnplugin.conf', 
> > 
> > owner=> root, 
> > 
> > group=> root, 
> > 
> > mode => '0644', 
> > 
> > before   => Exec['register-client'], 
> > 
> >   } 
> > 
> >   exec { 'register-client': 
> > 
> > command => "/usr/sbin/rhnreg_ks -v 
> > --serverUrl=http://${::spacewalk::spacewalk_server_fqdn}/XMLRPC 
> > --activationkey=${::spacewalk::activation_key} --force --nohardware 
> > --nopackages --novirtinfo --norhnsd -v", 
> > 
> > require => Class['spacewalk::install'], 
> > 
> > unless  => '/usr/sbin/spacewalk-channel -l', 
> > 
> >   } 
> > 
> > } 
> > 
> > 
> > 
> > Info: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: 
> > Starting to evaluate the resource 
> > 
> > Debug: Exec[register-client](provider=posix): Executing check 
> > '/usr/sbin/spacewalk-channel -l' 
> > 
> > Debug: Executing '/usr/sbin/spacewalk-channel -l' 
> > 
> > Debug: 
> > /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]/unless: 
> > Unable to locate SystemId file. Is this system registered? 
> > 
> > Debug: Exec[register-client](provider=posix): Executing 
> > '/usr/sbin/rhnreg_ks --serverUrl=http://spacewalk.example.com/XMLRPC 
> > --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> > --nopackages --novirtinfo --norhnsd' 
> > 
> > Debug: Executing '/usr/sbin/rhnreg_ks 
> > --serverUrl=http://spacewalk.example.com/XMLRPC 
> > --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware 
> > --nopackages --novirtinfo --norhnsd' 
> > 
> > Notice: 
> > /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]/returns: 
> > executed successfully 
> > 
> > Debug: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: The 
> > container Class[Spacewalk::Config] will propagate my refresh event 
> > 
> > Info: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: 
> > Evaluated in 47.20 seconds 
> > 
> > 
> > 
> > Thank you in advance, 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Puppet Users" group. 

[Puppet Users] Behavior of exported resource collectors

2015-01-20 Thread Martin Alfke
Hi,

I have the following code:

define monitor::host (
  $target,
  $monitortag = $::domain,
) {
}
…
}

The define gets exported on all nodes:

@@monitor::host { $::fqdn: }

And I collect on the monitor server:

Monitor::Host <<| |>> {
  target => ‘/full path to config’,
}

This is working as expected

No I want to collect from a specific monitortag only:

Monitor::Host <<| monitortag == ‘foo.com’ |>> {
  target => ‘/full path to config’,
}

Now we receive an error message on the host where we collect claiming that 
target is not set.

Is this known behaviour?

Many thanks,

Martin

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


Re: [Puppet Users] File() function weird behavior

2015-01-27 Thread Martin Alfke
Hi,

On 27 Jan 2015, at 13:45, Przemysław Szypowicz  wrote:

> Hi,
> 
> When I locally apply manifest:
> 
> file{'/tmp/cert.pem':
>   ensure => present,
>   content => file("/var/lib/puppet/ssl/private_keys/${::clientcert}.pem"),
> }
> 
> its working as expected.
> 
> But when thats manifest on puppet master, puppet agent -t gave me:
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find any files from 
> /var/lib/puppet/ssl/private_keys/host.internal.pem at 
> /etc/puppet/environments/production/modules/profiles/manifests/test.pp:31 on 
> node host.internal
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> 
> Any one knows why file() is not working in my case? I asked on IRC and looked 
> in docs but failed. 

First guess: file permissions.
Is the puppet user allowed to access the file?

hth,

Martin

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


[Puppet Users] [Solved] Behavior of exported resource collectors

2015-02-05 Thread Martin Alfke
Answering myself on this one:

the described behaviour is expected.
Many thanks to Henrik for his input on this.

Background:

when collecting all exported resources the parser uses a “shortcut” and does 
not inspect all exported resources.
When collecting a subset only, the parser needs to inspect all exported 
resources to analyse what to collect and what not.

Fix: set a sane default for all parameters in exported resources.

- Martin

On 20 Jan 2015, at 16:02, Martin Alfke  wrote:

> Hi,
> 
> I have the following code:
> 
> define monitor::host (
> $target,
> $monitortag = $::domain,
> ) {
> }
> …
> }
> 
> The define gets exported on all nodes:
> 
> @@monitor::host { $::fqdn: }
> 
> And I collect on the monitor server:
> 
> Monitor::Host <<| |>> {
> target => ‘/full path to config’,
> }
> 
> This is working as expected
> 
> No I want to collect from a specific monitortag only:
> 
> Monitor::Host <<| monitortag == ‘foo.com’ |>> {
> target => ‘/full path to config’,
> }
> 
> Now we receive an error message on the host where we collect claiming that 
> target is not set.
> 
> Is this known behaviour?
> 
> Many thanks,
> 
> Martin
> 

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


Re: [Puppet Users] Dependencies issue for puppet agent installation

2015-02-17 Thread Martin Alfke
Hi Subodh,

does the agent have the CentOS/RHEL repositories enabled?
Look into /etc/yum.repos.d and check for *.repo files.

hth,

Martin

On 17 Feb 2015, at 07:52, Subodh Kant  wrote:

> Hi Puppet Team,
> 
> I am facing Dependencies issue for puppet agent installation. Please help me 
> to resolved this issue. I am running PE 3.7 on CentOS 7 and clients are 
> CentOS 7 and RHEL 7. I ran this command on puppet agent...
> 
> curl -k https://host1.xxx.com:8140/packages/current/install.bash | sudo bash 
> -s agent:certname=host5.xxx.com
> 
> And getting this error
> 
> ---> Package pe-rubygem-net-ssh.noarch 0:2.1.4-2.pe.el7 will be installed
> ---> Package pe-virt-what.x86_64 0:1.14-1.el7 will be installed
> --> Finished Dependency Resolution
> Error: Package: pe-facter-2.2.0.2-1.pe.el7.x86_64 (puppetlabs-pepackages)
>Requires: pciutils
> Error: Package: pe-libldap-2.4.39-5.pe.el7.x86_64 (puppetlabs-pepackages)
>Requires: cyrus-sasl
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest
> /tmp/tmp.7k7yHBjblk: line 40: /opt/puppet/bin/puppet: No such file or 
> directory
> /tmp/tmp.7k7yHBjblk: line 41: /opt/puppet/bin/facter: No such file or 
> directory
> /tmp/tmp.7k7yHBjblk: line 41: /opt/puppet/bin/puppet: No such file or 
> directory
> /tmp/tmp.7k7yHBjblk: line 42: /opt/puppet/bin/puppet: No such file or 
> directory
> /tmp/tmp.7k7yHBjblk: line 15: /opt/puppet/bin/puppet: No such file or 
> directory
> /tmp/tmp.7k7yHBjblk: line 44: /opt/puppet/bin/puppet: No such file or 
> directory
> Error running install script /tmp/tmp.7k7yHBjblk
> 
> 
> Please help.
> 
> Thanks
> Subodh Kant
> 
> -- 
> 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/c57686b3-b5a6-4a73-8338-e30b21d46201%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/923E81D9-AE4D-4C3C-A57C-F2CC05380ED3%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Dependencies issue for puppet agent installation

2015-02-17 Thread Martin Alfke
Hi Subodh,

the Puppet master generates a catalog for the agent.
Within the catalog the agent receives information regarding its configuration.
The agent will then issue proper commands based on the declared Puppet resource 
types.
For packages the agent (RHEL, CentOS) will use the yum command.
This means that the agent needs access to a yum repository server.

Most companies do not want their agents to fetch packages directly from the 
internet and use a local repository mirror for that purpose.

hth,

Martin

On 17 Feb 2015, at 13:26, Subodh Kant  wrote:

> Hi Martin,
> 
> Thank you for your reply.
> 
> My CentOS servers does not have internet connectivity so CentOS repo will not 
> work in this case. And RHEL also not connected Redhat satellite server so 
> there is no repo for RHEL too.
> 
> On my puppet server only, yum.puppetlabs.com is enable and it can talk to 
> puppet yum repository.
> 
> My assumption is that, puppet client installation by using curl command will 
> talk to puppet server for all the dependencies since puppet server is part of 
> pe-repo class under classification and puppet client server will not required 
> internet connectivity for any dependencies. Am i correct ???
> 
> I do not want to enable internet for puppet client servers.
> 
> Please help.
> 
> Thanks
> Subodh Kant 
> 
> -- 
> 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/c67c1d53-cc7a-43ed-8109-3838b903dba9%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/9225492D-96BD-475C-AACC-D730838AB3E8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Dependencies issue for puppet agent installation

2015-02-17 Thread Martin Alfke
Hi Subodh,

when using the simple curl puppet agent installer method you will get a repo 
file created on the node and the puppet master acts as pe-package repository 
server.
All non PE packages have to be installed using the normal cents/rhel 
repositories.

hth,

Martin

On 17 Feb 2015, at 16:44, Subodh Kant  wrote:

> Hi Martin,
> 
> Thanks.
> 
> But how other packages are getting resolved?? If you see my log, all packages 
> "pe-x" are getting resolved but only two packages (pciutils, cyrus-sasl) 
> are getting fail which is not "pe-x". When i install these two packages 
> manually by RPM and then i ran "curl" command to registration, i was able to 
> registration the node to puppet master.
> 
> ---> Package pe-rubygem-net-ssh.noarch 0:2.1.4-2.pe.el7 will be installed
> ---> Package pe-virt-what.x86_64 0:1.14-1.el7 will be installed
> --> Finished Dependency Resolution
> Error: Package: pe-facter-2.2.0.2-1.pe.el7.x86_64 (puppetlabs-pepackages)
>Requires: pciutils
> Error: Package: pe-libldap-2.4.39-5.pe.el7.x86_64 (puppetlabs-pepackages)
>Requires: cyrus-sasl
>  You could try using --skip-broken to work around the problem
> 
> 
> Thanks
> Subodh Kant
> 
> -- 
> 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/CAAbO_CUScvAs5nao_16py%2BQ8%3DRhJvU1exNEDzz634e-uJwkYzA%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/FC5DFC6F-C49E-4ECD-B272-9F5B1785CF37%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Dependencies issue for puppet agent installation

2015-02-17 Thread Martin Alfke
Hi Subodh,

you might want a repository mirror inside your network.
Or: add a local repo only having the required packages.
Or: install required packages during provisioning.

Best,

Martin

On 18 Feb 2015, at 07:26, Subodh Kant  wrote:

> Hi Martin,
> 
> Thanks.
> 
> Is there any way to install puppet agent without having internet 
> connectivity.??
> 
> Thnaks
> Subodh Kant
> 
> -- 
> 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/785b7f89-56bf-4f6a-8b89-2aeb210a1d68%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/867DF13F-4373-49D9-964B-BB590B4B621A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] delete line in file with substring xyz

2015-02-25 Thread Martin Alfke
The single quotes take the argument as it is.
In this case you are looking for a line with *xyz*
Maybe you want to try double quotes.

hth,

Martin

On 25 Feb 2015, at 13:58, Andreas Dvorak  wrote:

> Dear all
> 
> I would like to use the stdlib Modul with file_line to delete a line that 
> matches *xyz*.
> But the resource
> 
> file_line {'delete line':
>   ensure => absent,  
>   path => '/etc/file', 
>   line => '*xyz*',
> }
> 
> or 
> 
> file_line {'delete line':
>   ensure => absent,  
>   path => '/etc/file', 
>   match => '*xyz*',
> }
> 
> does not work.
> 
> My current solution is with an exec resource but I don't like it.
> 
> Does anymbody know how to do it with file_line?
> 
> Andreas
> 
> -- 
> 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/bd72d951-bcb7-4091-879e-047d65d20407%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/33F0B944-9D59-4171-AEBD-48CD71BC2568%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Selectively Install Packages

2015-03-04 Thread Martin Alfke
Hi,
On 04 Mar 2015, at 15:57, Steve Harp  wrote:

> Hi Guys,
> 
> I'm using Puppet for many configuration items and package deployments.  I 
> need to be able to only deploy certain packages/classes when the Agent sends 
> a definable command line option.  
> 
> Example: puppet agent --onetime --no-daemonize --verbose 
> --do_something_special
> 
> I want to be able to execute a class only when the '--do_something_special' 
> flag is passed.

You can use the —tag option to only do what is mentioned in a specific class.

e.g. puppet agent —test —tags apache

Classes will become tags automatically.
Besides this you can use the tag metaparameter on the package resource.

hth,

Martin

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


Re: [Puppet Users] Selectively Install Packages

2015-03-04 Thread Martin Alfke
Hi Steve,

with tags you only can execute classes which are enabled anyway.
It is a  way to limit execution on a certain subset of classes.

What else:
you can provide a fact at CLI and react on that specific fact:

FACTER_runnow=true puppet agent —test —tags 

Inside your class you will do something like

class foo {
  if $::runnow {
notify { ‘Only when run now is set’: }
  }
}

On 04 Mar 2015, at 17:12, Steve Harp  wrote:

> Thanks Martin.
> 
> I've tried adding a tag 'testing' to a class and the class deploys regardless 
> of the '--tags testing' being on the puppet agent command line or not.  What 
> am I missing?  I need the class to deploy if and only if specified.
> 
> Thanks...
> 
> On Wednesday, March 4, 2015 at 10:05:34 AM UTC-5, Martin Alfke wrote:
> Hi, 
> On 04 Mar 2015, at 15:57, Steve Harp  wrote: 
> 
> > Hi Guys, 
> > 
> > I'm using Puppet for many configuration items and package deployments.  I 
> > need to be able to only deploy certain packages/classes when the Agent 
> > sends a definable command line option.   
> > 
> > Example: puppet agent --onetime --no-daemonize --verbose 
> > --do_something_special 
> > 
> > I want to be able to execute a class only when the '--do_something_special' 
> > flag is passed. 
> 
> You can use the —tag option to only do what is mentioned in a specific class. 
> 
> e.g. puppet agent —test —tags apache 
> 
> Classes will become tags automatically. 
> Besides this you can use the tag metaparameter on the package resource. 
> 
> hth, 
> 
> Martin 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/2a49081b-bd40-440b-aa86-4937354012de%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/F7829755-16F5-4083-A063-AA816121EEDA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] new to puppet.

2015-03-21 Thread Martin Alfke
Hi,

the best way is to start with learning puppet vm and the according website: 
https://docs.puppetlabs.com/learning/index.html 

At https://puppetlabs.com/learn  you have the 
possibility to get a guide through Puppet basics without the need for a VM.

It is always the best to first understand the concept behind puppet and then 
start with real world problems.

hth,

Martin


> On 19.03.2015, at 15:45, manyi  wrote:
> 
> does anyone has a manifest I can use to:
> 1. Create an account for Mary, maryjane on all systems
> 2. Create a specific user on just a specific system  (For example,  create 
> account john.doe on puppet-domain but not on puppetagent)
> 
> -- 
> 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/78b8556c-2bff-4da4-a335-101a19a5f402%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/F88CFF7B-8194-48E9-B72C-BD2356F3DA2A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: [Announce] Micro-puppet v0.0.2 now available with new code extinguisher feature

2015-04-01 Thread Martin Alfke
I really like the approach of m::in { auto: } and m::cf { auto: } to have my 
systems up and running in seconds.
I just think of my new configuration to change and everything works. ;-)
no more manual work. more beertime.
And: the future fix script works as documented. ;-)

happy hacking!!


On 01 Apr 2015, at 11:43, Raphink  wrote:

> This is great!
> 
> I was looking forward to something that would be more useable than the 
> puppet-lint plugins to migrate my Puppet code, and this is just so simple and 
> efficient! Thank you!
> 
> 
> On Wednesday, April 1, 2015 at 10:00:56 AM UTC+2, Corey Osman wrote:
> On the heels of the previously announced tiny-puppet 
> (https://github.com/example42/puppet-tp.git) now comes micro-puppet.  A 
> shortened version of tiny-puppet for the keystroke impaired.  But with 
> Micro-puppet there is so much more.  Version 0.0.2 now brings a new feature 
> called code extinguisher that fixes all your puppet 2.7.x code depreciation 
> warnings and automagically converts them to take advantage of the new parser 
> found only in puppet 4. 
> 
> To learn more about the advantages of using Micro puppet please visit the 
> following repo: 
> 
> https://github.com/logicminds/micro-puppet.git 
> 
> 
> Corey 
> 
> 
> 
> -- 
> 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/ff144551-d822-4da9-bfb7-fea0e679f7d6%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/52BB7A31-6D12-4CAB-806B-E706FCF3335E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Upgrading from 0.25.1 to 3.7.4

2015-04-01 Thread Martin Alfke
Hi James,

a horrible task (I am still busy at a customer upgrading the puppet DSL code 
from 2.7.23).

You want to get rid of:
- non-scoped variables (in manifests, modules and templates)
- import in class files

You might need to:
- clean up node classification
- rewrite classes to have parameters
- rewrite self developed facts, functions, types, providers

And you definitely want to have rspec tests in place.

Good luck.

Martin

P.S. I know of at least one installation where they did not upgrade, but a 
complete rewrite and a new puppet master.

On 01 Apr 2015, at 17:17, James Perry  wrote:

> I have been tasked to upgrade puppet 0.25.1 to 3.7.4.  There has been a lot 
> of past admins tweaking this puppet server and most of the existing modules 
> are all ad-hoc creations. I want to ensure I do not miss any expected 
> dependencies, but I also do not have months to manually traverse the entire 
> Puppet site.pp file by hand.
> 
> Is there some tool, script or puppet command that will show me a quick 
> digestion for each node as to what modules it includes and inherits? 
> 
> 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/1971bf52-6c44-4b96-80fb-72c9dc096355%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/703D6255-BAE5-4648-855E-68BD1D7689E5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Managing multiple files in a directory - permissions issue

2015-04-07 Thread Martin Alfke

On 07 Apr 2015, at 04:55, Dave Hunsinger  wrote:

> Can somebody help me with what I'm doing wrong here? I want to copy all 
> sshkeys in the file resource of this puppet module to the machine:
> 
> class sshkeys {
> 
> file { '/etc/ssh/ssh.keys':
>   ensure => directory,
>   owner => 'root',
>   group => 'root',
>   source => "puppet:///sshkeys",
>   recurse => true,
>   purge => true,
>   }
> 
> }

You need to change the source:

source => ‘puppet:///modules/sshkeys',

> 
> Info: Applying configuration version '1428375139'
> Error: /Stage[main]/Sshkeys/File[/etc/ssh/ssh.keys]: Failed to generate 
> additional resources using 'eval_generate': Error 400 on SERVER: Not 
> authorized to call search on /file_metadata/development/sshkeys with 
> {:links=>"manage", :recurse=>true, :checksum_type=>"md5"}
> Error: /Stage[main]/Sshkeys/File[/etc/ssh/ssh.keys]: Could not evaluate: 
> Could not retrieve file metadata for puppet:///development/sshkeys: Error 400 
> on SERVER: Not authorized to call find on /file_metadata/development/sshkeys 
> with {:links=>"manage", :source_permissions=>"use"}
> Wrapped exception:
> Error 400 on SERVER: Not authorized to call find on 
> /file_metadata/development/sshkeys with {:links=>"manage", 
> :source_permissions=>"use"}
> Notice: Finished catalog run in 1.15 seconds
> [root@lfmx-lin-stg01 daveh]#
> 
> 
> 
> 
> CallidusCloud HQ has moved. 
> Our new address is: 
> 4140 Dublin Blvd, Suite 400, Dublin, CA 94568  
> 
> -- 
> 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/68fbbb6c-b0a1-4319-94a2-48e47e2247aa%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/38B69EAB-3FB9-42CF-888D-2EE141E22606%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] developing module for k5login

2015-04-07 Thread Martin Alfke

On 06 Apr 2015, at 17:35, Dhaval  wrote:

> hello,
> 
> I am trying to develop puppet module for k5login entries .. now my question 
> is, how do i manage entries for multiple hierarchies ?
> 
> currently when i try it, it picks up from where it finds entry first and 
> completes it, how do i get values so it creates an array from all hierachies 
> and then populates the k5login?
> 
> i tried "deeper" merging and hiera_array, still not sure why it's not 
> working. anything special i need to do ?

Hi Dhaval,

it would be great if you can post the puppet code and your hiera data.
Otherwise people have to guess.

Best,

Martin

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


Re: [Puppet Users] how to list all classes deployed/running on a puppet agent?

2015-04-16 Thread Martin Alfke

On 16 Apr 2015, at 19:50, Robert Chen  wrote:

> how to list all classes deployed/running on a puppet agent? 
> 
> how to get all running puppet agent/IP addresses managed by the master? ( the 
> puppet cert list --all list all certs which does not mean an agent is 
> running).

you want to enable reporting on the agent and store the reports on the master.
you can either store reports as files on disk or use puppetdb and then query 
the rest api.
https://docs.puppetlabs.com/guides/reporting.html

hth,
Martin

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


Re: [Puppet Users] Send master B's reports to PuppetDB on a master A?

2015-04-28 Thread Martin Alfke
Hi Ryan,

On 28 Apr 2015, at 01:34, Ryan Anderson  wrote:

> I have a need to send reports from a puppet master B in datacenter B to 
> puppetdb on master A in datacenter A. Both are using puppet open source 3.7.1 
> and puppetdb 2.2 (master A) or puppetdb-terminus (master B).

This is easily possible when using a common CA between both masters.
1. Master of Masters (CA, Modules for PuppetDB and Puppet Masters)
2. Puppet DB
3. Puppet Master A (catalog compile and file serving)
4. Puppet Master B (catalog compile ans file serving)

> 
> I have done all steps here: 
> https://docs.puppetlabs.com/puppetdb/2.2/connect_puppet_master.html. However, 
> this page says nothing about using SSL certs so that puppetdb-terminus on 
> master B can connect to https port 8081 on master A. I get errors like this:
> Warning: Error 400 on SERVER: Could not retrieve facts for 
> masterB.example.com: Failed to find facts from PuppetDB at 
> masterA.example.com:8081: SSL_connect returned=1 errno=0 state=SSLv3 read 
> server certificate B: certificate verify failed: [unable to get local issuer 
> certificate for /CN=masterA.example.com]
> 
> The separate page on setting up master-less puppet agents to send puppetdb 
> reports touches on this: 
> https://docs.puppetlabs.com/puppetdb/2.2/connect_puppet_apply.html
> 
> The most promising solution here looks like setting up an apache SSL proxy 
> that redirects https 8081 to localhost:8080 mentioned here: 
> https://docs.puppetlabs.com/puppetdb/2.2/connect_puppet_apply.html#option-a-set-up-an-ssl-proxy-for-puppetdb.
>  However, I know little about configuring apache this way, and an example 
> config isn't provided. It even says 
> More detailed instructions for setting up this proxy will be added to this 
> guide at a later date". The 2.3 instruction lacks this also. Any ideas?
> 
The apache documentation for mod_proxy has some examples on how to set up an 
https -> http proxy.

hth,

Martin

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


Re: [Puppet Users] Juniper SRX 5400

2015-04-28 Thread Martin Alfke

> On 28.04.2015, at 11:17, rto...@gmail.com wrote:
> 
> Does puppet support provisioning the juniper SRX-5400.
> I could not find yet. If yes then could you please direct me in right 
> direction with some available documents.
> 

http://www.juniper.net/techpubs/en_US/junos-puppet1.0/information-products/pathway-pages/junos-puppet.html
 


Supported Platforms:
ES Series
MX Series
QFX Series

Further documentation can be found at juniper website:
http://www.juniper.net/techpubs/en_US/release-independent/junos-puppet/information-products/pathway-pages/
 

http://www.juniper.net/techpubs/en_US/junos-puppet1.0/topics/concept/automation-junos-puppet-overview.html
 


Or from puppet forge:
https://forge.puppetlabs.com/juniper/netdev_stdlib_junos 



> Thanks
> -Rajiv
> 
> -- 
> 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/5cbfa149-5205-431b-bd35-f11776c485e3%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/0D7CE895-42CD-49F3-B6DD-255CC1D20689%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] parameters from agent to master

2015-04-29 Thread Martin Alfke
the agent sends facts to master.
you want to look for facter extensions to geht data from agent to master.
On Apr 29, 2015 3:27 PM,  wrote:

> Is there a way to pass parameters from agent to master?
>
> --
> 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/05e55640-bb77-4b2b-917f-added688085d%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/CAH_Azc1V%2BugDT%2BTE1VNwoyGJHJKSs_DvUDUzRFZhdh5tFFZVGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Fresh Puppet PE 3.8 install error

2015-04-30 Thread Martin Alfke
Hi Kamil,

have you tried setting the path attribute at the exec resource?
Puppet exec starts with an empty environment and you are using several Unix
commands without full path.

hth,
Martin
On Apr 30, 2015 7:29 PM, "Kamil Keski"  wrote:

> Thanks for the reply Josh.  I worked through this and other posts I found
> pointing to the tmp issue.  However I don't have /tmp or /usr/tmp mounted,
> they are just dir's on the root mount.
>
> fstab:
>
> #
> /dev/mapper/ITTPuppet--vg-root /   ext4errors=remount-ro 0
>   1
> # /boot was on /dev/sda1 during installation
> UUID=89c2c14f-03a6-4f43-9935-25061c52e4f9 /boot   ext2defaults
>0   2
> /dev/mapper/ITTPuppet--vg-swap_1 noneswapsw  0
>   0
> /dev/fd0/media/floppy0  autorw,user,noauto,exec,utf8 0   0
>
> Pretty vanilla stuff here, so noexecute should not be an issue in this
> instance.  For good measure I tried creating a new dir (/usr/tmp) with 777
> and defined -Djava.io.tmpdir=/usr/tmp globally via my /bashrc profile for
> the user I'm running under and root.  Verified that was picked up via java
> -version.
>
> Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/usr/tmp
> java version "1.6.0_35"
> OpenJDK Runtime Environment (IcedTea6 1.13.7)
> (6b35-1.13.7-1ubuntu0.12.04.2)
> OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
>
> Still same behavior.  I don't see how anyone has worked through a fresh
> install on Ubuntu at this point.
>
> Thanks,
> K
>
> On Wednesday, April 29, 2015 at 4:03:13 PM UTC-6, Josh Cooper wrote:
>>
>>
>>
>> On Wed, Apr 29, 2015 at 1:10 PM, Kamil Keski 
>> wrote:
>>
>>> Clean slate install on Ubuntu 14.04 produces the following error and
>>> will not proceed.
>>>
>>> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
>>> https://puppetmaster.local:8140
>>> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
>>> https://puppetmaster.local:8140
>>> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
>>> https://puppetmaster.local:8140
>>> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
>>> https://puppetmaster.local:8140
>>>
>>> 
>>> ** cp /opt/puppet/share/installer/install_log.lastrun.ITTPuppet.log 
>>> /var/log/pe-installer
>>> ** sed "s/^\(q_.*password\)=.*/#\1=REDACTED/g" < 
>>> "/tmp/pe-installer-M4MbxK1G/install/answers.lastrun.ITTPuppet" > 
>>> "/var/log/pe-installer/answers.install"
>>> !! ERROR: The puppet master service failed to start within 120
>>>seconds; unable to proceed
>>>
>>>
>>> I am using puppetmaster.local as the FQDN which is resolvable from the
>>> server and the client machine I'm executing the web install from (mapped in
>>> hosts file for testing).  Nothing else of interest in the log files.  Have
>>> tried on two separate clean images to no avail.
>>>
>>> pe-puppetserver log shows the following.
>>>
>>> Failed to load feature test for posix: can't find user for 0
>>> Cannot run on Microsoft Windows without the win32-process, win32-dir and
>>> win32-service gems: Win32API only supported on win32
>>> Puppet::Error: Cannot determine basic system flavour
>>>  (root) at
>>> /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/feature/base.rb:32
>>> require at org/jruby/RubyKernel.java:1071
>>>
>>> Well that's interesting..
>>>
>>> All default packages have been updated.
>>>
>>> Maddening!
>>>
>>> Any idea's?
>>>
>>> Thanks,
>>> K
>>>
>>> --
>>> 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/75aa1033-96b8-4a09-9028-447d6e27eb1b%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> I agree the error message is anything but useful, and you're not the
>> first to run into it. I think this is the issue you're seeing
>> https://docs.puppetlabs.com/puppetserver/latest/known_issues.html#tmp-directory-mounted-noexec
>>
>> Josh
>>
>> --
>> Josh Cooper
>> Developer, Puppet Labs
>>
>> *PuppetConf 2015  is coming to Portland,
>> Oregon! Join us October 5-9.*
>> *Register now to take advantage of the Early Adopter discount
>> 
>>  *
>> *—**save $349!*
>>
>  --
> 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

Re: [Puppet Users] Fresh Puppet PE 3.8 install error

2015-05-01 Thread Martin Alfke
Confirmed.
This package list also solves installation issue on Ubuntu 14.10

Many thanks,

Martin

On 01 May 2015, at 19:49, Jay Benner  wrote:

> Nailed it!  Not sure which package did the trick, but smooth sailing after 
> installing these.
> 
> On Thursday, April 30, 2015 at 5:21:20 PM UTC-7, Kamil Keski wrote:
> Scratch 2.1.5 as the issue.  Quick lsof shows that everything is still using 
> the 1.9.1 binary pulled in the install.  Only other thing I installed was the 
> following packages as they are my default pulls for a ruby build.
> 
> zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev 
> libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev 
> python-software-properties
> I'm not going any deeper than that on this one.  I'm tired of drudging 
> through .rb's and am leaving this as is.
> 
> Still, on a pure fresh Ubuntu 12.04 or 14.04 install there is a dependency 
> that the PE installer is not pulling down.
> 
> If you're a user and need a quick fix just install the above packages.
> 
> Puppet devs, if you can track down which and package that into the installer 
> that would be fantastic.
> 
> Thanks,
> K
> 
> On Thursday, April 30, 2015 at 3:43:27 PM UTC-6, Kamil Keski wrote:
> Going to answer my own question here as there is likely no way a fresh 
> install of PE 3.8 will succeed on Ubuntu 12.04 or 14.04.  Ruby comes 
> preinstalled with the distro's with a version of 1.9 (old for sure).  However 
> this should be known.  I Installed 2.1.5, made global and the installation of 
> PE 3.8 succeeded.
> 
> I'd like to see the PE install updated to pull a version of Ruby that it 
> requires (who knows, 2.0 may be sufficient).  At minimum listing that you 
> have a minimum version of Ruby installed as a prerequisite.
> 
> On Thursday, April 30, 2015 at 12:50:27 PM UTC-6, Kamil Keski wrote:
> Yes, I've added the temp path arg to the pe-puppetserver init as well.  No go.
> 
> Has anyone installed successfully from scratch using an ubuntu 12.04 or 14.04 
> distro?  Not an existing one, but a nice fresh build?
> 
> On Thursday, April 30, 2015 at 11:49:29 AM UTC-6, Martin Alfke wrote:
> Hi Kamil,
> 
> have you tried setting the path attribute at the exec resource?
> Puppet exec starts with an empty environment and you are using several Unix 
> commands without full path.
> 
> hth,
> Martin
> 
> On Apr 30, 2015 7:29 PM, "Kamil Keski"  wrote:
> Thanks for the reply Josh.  I worked through this and other posts I found 
> pointing to the tmp issue.  However I don't have /tmp or /usr/tmp mounted, 
> they are just dir's on the root mount.
> 
> fstab:
> 
> #
> /dev/mapper/ITTPuppet--vg-root /   ext4errors=remount-ro 0
>1
> # /boot was on /dev/sda1 during installation
> UUID=89c2c14f-03a6-4f43-9935-25061c52e4f9 /boot   ext2defaults
> 0   2
> /dev/mapper/ITTPuppet--vg-swap_1 noneswapsw  0
>0
> /dev/fd0/media/floppy0  autorw,user,noauto,exec,utf8 0   0
> 
> Pretty vanilla stuff here, so noexecute should not be an issue in this 
> instance.  For good measure I tried creating a new dir (/usr/tmp) with 777 
> and defined -Djava.io.tmpdir=/usr/tmp globally via my /bashrc profile for the 
> user I'm running under and root.  Verified that was picked up via java 
> -version.
> 
> Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/usr/tmp
> java version "1.6.0_35"
> OpenJDK Runtime Environment (IcedTea6 1.13.7) (6b35-1.13.7-1ubuntu0.12.04.2)
> OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
> 
> Still same behavior.  I don't see how anyone has worked through a fresh 
> install on Ubuntu at this point.
> 
> Thanks,
> K
> 
> On Wednesday, April 29, 2015 at 4:03:13 PM UTC-6, Josh Cooper wrote:
> 
> 
> On Wed, Apr 29, 2015 at 1:10 PM, Kamil Keski  wrote:
> Clean slate install on Ubuntu 14.04 produces the following error and will not 
> proceed.
> 
> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
> https://puppetmaster.local:8140
> 
> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
> https://puppetmaster.local:8140
> 
> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
> https://puppetmaster.local:8140
> 
> ** HTTP_PROXY= http_proxy= HTTPS_PROXY= https_proxy= curl --tlsv1 -s 
> https://puppetmaster.local:8140
> 
> 
> ==
> ==
> 
> ** cp /opt/puppet/share/installer/
> install_log.lastrun.ITTPuppet.
> log /var/log/pe-installer
> ** sed "s/^\(q_.

Re: [Puppet Users] Fresh Puppet PE 3.8 install error

2015-05-01 Thread Martin Alfke
I have created a blog posting with PE 3.8 installation issues and fixes on 
Debian 6 and 7, CentOS 6 and 7, SLES 11 and 12, Ubuntu 12.04 and 14.10:
http://tuxmea.blogspot.de/2015/05/puppet-enterprise-38-installation-steps.html

On 01 May 2015, at 19:58, Martin Alfke  wrote:

> Confirmed.
> This package list also solves installation issue on Ubuntu 14.10
> 
> Many thanks,
> 
> Martin
> 
> On 01 May 2015, at 19:49, Jay Benner  wrote:
> 
>> Nailed it!  Not sure which package did the trick, but smooth sailing after 
>> installing these.
>> 
>> On Thursday, April 30, 2015 at 5:21:20 PM UTC-7, Kamil Keski wrote:
>> Scratch 2.1.5 as the issue.  Quick lsof shows that everything is still using 
>> the 1.9.1 binary pulled in the install.  Only other thing I installed was 
>> the following packages as they are my default pulls for a ruby build.
>> 
>> zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev 
>> libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev 
>> python-software-properties
>> I'm not going any deeper than that on this one.  I'm tired of drudging 
>> through .rb's and am leaving this as is.
>> 
>> Still, on a pure fresh Ubuntu 12.04 or 14.04 install there is a dependency 
>> that the PE installer is not pulling down.
>> 
>> If you're a user and need a quick fix just install the above packages.
>> 
>> Puppet devs, if you can track down which and package that into the installer 
>> that would be fantastic.
>> 
>> Thanks,
>> K
>> 
>> On Thursday, April 30, 2015 at 3:43:27 PM UTC-6, Kamil Keski wrote:
>> Going to answer my own question here as there is likely no way a fresh 
>> install of PE 3.8 will succeed on Ubuntu 12.04 or 14.04.  Ruby comes 
>> preinstalled with the distro's with a version of 1.9 (old for sure).  
>> However this should be known.  I Installed 2.1.5, made global and the 
>> installation of PE 3.8 succeeded.
>> 
>> I'd like to see the PE install updated to pull a version of Ruby that it 
>> requires (who knows, 2.0 may be sufficient).  At minimum listing that you 
>> have a minimum version of Ruby installed as a prerequisite.
>> 
>> On Thursday, April 30, 2015 at 12:50:27 PM UTC-6, Kamil Keski wrote:
>> Yes, I've added the temp path arg to the pe-puppetserver init as well.  No 
>> go.
>> 
>> Has anyone installed successfully from scratch using an ubuntu 12.04 or 
>> 14.04 distro?  Not an existing one, but a nice fresh build?
>> 
>> On Thursday, April 30, 2015 at 11:49:29 AM UTC-6, Martin Alfke wrote:
>> Hi Kamil,
>> 
>> have you tried setting the path attribute at the exec resource?
>> Puppet exec starts with an empty environment and you are using several Unix 
>> commands without full path.
>> 
>> hth,
>> Martin
>> 
>> On Apr 30, 2015 7:29 PM, "Kamil Keski"  wrote:
>> Thanks for the reply Josh.  I worked through this and other posts I found 
>> pointing to the tmp issue.  However I don't have /tmp or /usr/tmp mounted, 
>> they are just dir's on the root mount.
>> 
>> fstab:
>> 
>> #
>> /dev/mapper/ITTPuppet--vg-root /   ext4errors=remount-ro 0   
>> 1
>> # /boot was on /dev/sda1 during installation
>> UUID=89c2c14f-03a6-4f43-9935-25061c52e4f9 /boot   ext2defaults   
>>  0   2
>> /dev/mapper/ITTPuppet--vg-swap_1 noneswapsw  0   
>> 0
>> /dev/fd0/media/floppy0  autorw,user,noauto,exec,utf8 0   0
>> 
>> Pretty vanilla stuff here, so noexecute should not be an issue in this 
>> instance.  For good measure I tried creating a new dir (/usr/tmp) with 777 
>> and defined -Djava.io.tmpdir=/usr/tmp globally via my /bashrc profile for 
>> the user I'm running under and root.  Verified that was picked up via java 
>> -version.
>> 
>> Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/usr/tmp
>> java version "1.6.0_35"
>> OpenJDK Runtime Environment (IcedTea6 1.13.7) (6b35-1.13.7-1ubuntu0.12.04.2)
>> OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
>> 
>> Still same behavior.  I don't see how anyone has worked through a fresh 
>> install on Ubuntu at this point.
>> 
>> Thanks,
>> K
>> 
>> On Wednesday, April 29, 2015 at 4:03:13 PM UTC-6, Josh Cooper wrote:
>> 
>> 
>> On Wed, Apr 29, 2015 at 1:10 PM, Kamil Keski  wrote:
>> Clean slate install on Ubuntu 14.04 produces the following error and will 
>> not proceed.
>> 

[Puppet Users] How to do Puppet type which autorequire an existing declaration of another type

2015-05-10 Thread Martin Alfke
Hi,

I am working on some types and providers for opennebula network management.

I have one type already finished, which creates the network itself.
Each network can have multiple address ranges.

My idea so far:

onevnet { ’testnet’:
  ensure => present,
  …
}

onevnet_addressrange { ‘’:
  ensure  => present,
  onevnet => ‘testnet’,
  …
}

How can I enforce that onevent ‘testnet’ has to be declared?
I found auto require but that seems to be optional (or did I miss something).

You can find the actual code on github: 
https://github.com/tuxmea/opennebula-puppet-module/tree/onevnet_multinet_provider

Please note:
I am not a developer so please don’t start screaming immediately when seeing 
the code.
I am happy to receive recommendations and ideas.

Thanks in advance,

Martin

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


Re: [Puppet Users] How to do Puppet type which autorequire an existing declaration of another type

2015-05-11 Thread Martin Alfke
Hi John,

many thanks for your explanation.
I will stay with auto require to allow managing resource B without the need for 
having the depending A resource declared within puppet too.

Best,

Martin


On 11 May 2015, at 16:17, jcbollinger  wrote:

> 
> 
> On Sunday, May 10, 2015 at 8:03:25 AM UTC-5, Martin Alfke wrote:
> Hi, 
> 
> I am working on some types and providers for opennebula network management. 
> 
> I have one type already finished, which creates the network itself. 
> Each network can have multiple address ranges. 
> 
> My idea so far: 
> 
> onevnet { ’testnet’: 
>   ensure => present, 
>   … 
> } 
> 
> onevnet_addressrange { ‘’: 
>   ensure  => present, 
>   onevnet => ‘testnet’, 
>   … 
> } 
> 
> How can I enforce that onevent ‘testnet’ has to be declared? 
> I found auto require but that seems to be optional (or did I miss something). 
> 
> 
> Autorequire is about order-of-application dependencies between resources 
> under Puppet management.  It is not about which resources should be under 
> management in the first place.  For example, autorequire automatically causes 
> a File's parent directory to be managed before the File itself, provided that 
> the parent is under management.
> 
> You should consider structuring your type so that instances do not inherently 
> depend on another resource being declared.  A hard dependency such as that is 
> a good sign that your resource is not properly scoped.
> 
> If for some reason you must have a hard dependency, then the easiest route to 
> take might be to specify that the plugin type is for your module's internal 
> use only (though you cannot enforce that), and provide a defined type wrapper 
> for public use.  The wrapper can declare a fixed, unconditional relationship 
> with whatever other resources you like, and catalog building will fail if any 
> of those resources is not declared.
> 
> 
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/d0ce5ac8-100a-42ed-90d5-ee5286c7aa7c%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/7963F5C4-3520-4D4A-B96C-A5B1178A96EB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Fresh Puppet PE 3.8 install error

2015-05-25 Thread Martin Alfke
Hi Paolo,

the answer was a few mails earlier:

install the following package list:
zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev 
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev 
python-software-properties 

Also see 
http://tuxmea.blogspot.de/2015/05/puppet-enterprise-38-installation-steps.html 
for other Ubuntu related installation issues.

Best,

Martin

On 26 May 2015, at 00:53, Paolo Marin  wrote:

> I am having the same issue. 
> Installing PE 3.8 to ubuntu 12.04.
> Installer fail with the following:
> 
> " ** cp /opt/puppet/share/installer/install_log.lastrun."FQDN".log 
> /var/log/pe-installer
> ** sed "s/^\(q_.*password\)=.*/#\1=REDACTED/g" < 
> "/tmp/pe-installer-wU0wqDPV/install/answers.lastrun."FQDN" > 
> "/var/log/pe-installer/answers.install"
> !! ERROR: The puppet master service failed to start within 120
>seconds; unable to proceed
> 
> 
> I have tried 3 times and I thing this is a bug with the product.
> 
> Please advice of any solution.
> Thanks
> 
> 
> On Saturday, May 2, 2015 at 3:58:39 AM UTC+10, Martin Alfke wrote:
> Confirmed. 
> This package list also solves installation issue on Ubuntu 14.10 
> 
> Many thanks, 
> 
> Martin 
> 
> On 01 May 2015, at 19:49, Jay Benner  wrote: 
> 
> > Nailed it!  Not sure which package did the trick, but smooth sailing after 
> > installing these. 
> > 
> > On Thursday, April 30, 2015 at 5:21:20 PM UTC-7, Kamil Keski wrote: 
> > Scratch 2.1.5 as the issue.  Quick lsof shows that everything is still 
> > using the 1.9.1 binary pulled in the install.  Only other thing I installed 
> > was the following packages as they are my default pulls for a ruby build. 
> > 
> > zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev 
> > libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev 
> > python-software-properties 
> > I'm not going any deeper than that on this one.  I'm tired of drudging 
> > through .rb's and am leaving this as is. 
> > 
> > Still, on a pure fresh Ubuntu 12.04 or 14.04 install there is a dependency 
> > that the PE installer is not pulling down. 
> > 
> > If you're a user and need a quick fix just install the above packages. 
> > 
> > Puppet devs, if you can track down which and package that into the 
> > installer that would be fantastic. 
> > 
> > Thanks, 
> > K 
> > 
> > On Thursday, April 30, 2015 at 3:43:27 PM UTC-6, Kamil Keski wrote: 
> > Going to answer my own question here as there is likely no way a fresh 
> > install of PE 3.8 will succeed on Ubuntu 12.04 or 14.04.  Ruby comes 
> > preinstalled with the distro's with a version of 1.9 (old for sure).  
> > However this should be known.  I Installed 2.1.5, made global and the 
> > installation of PE 3.8 succeeded. 
> > 
> > I'd like to see the PE install updated to pull a version of Ruby that it 
> > requires (who knows, 2.0 may be sufficient).  At minimum listing that you 
> > have a minimum version of Ruby installed as a prerequisite. 
> > 
> > On Thursday, April 30, 2015 at 12:50:27 PM UTC-6, Kamil Keski wrote: 
> > Yes, I've added the temp path arg to the pe-puppetserver init as well.  No 
> > go. 
> > 
> > Has anyone installed successfully from scratch using an ubuntu 12.04 or 
> > 14.04 distro?  Not an existing one, but a nice fresh build? 
> > 
> > On Thursday, April 30, 2015 at 11:49:29 AM UTC-6, Martin Alfke wrote: 
> > Hi Kamil, 
> > 
> > have you tried setting the path attribute at the exec resource? 
> > Puppet exec starts with an empty environment and you are using several Unix 
> > commands without full path. 
> > 
> > hth, 
> > Martin 
> > 
> > On Apr 30, 2015 7:29 PM, "Kamil Keski"  wrote: 
> > Thanks for the reply Josh.  I worked through this and other posts I found 
> > pointing to the tmp issue.  However I don't have /tmp or /usr/tmp mounted, 
> > they are just dir's on the root mount. 
> > 
> > fstab: 
> > 
> > # 
> > /dev/mapper/ITTPuppet--vg-root /   ext4errors=remount-ro 0  
> >  1 
> > # /boot was on /dev/sda1 during installation 
> > UUID=89c2c14f-03a6-4f43-9935-25061c52e4f9 /boot   ext2defaults  
> >   0   2 
> > /dev/mapper/ITTPuppet--vg-swap_1 noneswapsw  0  
> >  0 
> > /dev/fd0/media/floppy0  autorw,user,noauto,exec,utf8 0   0 
> > 
> > Pretty vanilla stuf

Re: [Puppet Users] Facter throwing MySQL errors

2015-05-29 Thread Martin Alfke
Have you tried running facter -p
This will also pull the pluginsynced facts.

(I am unsure which version has puppet facter)


On 29 May 2015, at 11:21, Jonathan Gazeley  
wrote:

> Hi folks,
> 
> Since upgrading to Puppet 3.8.1 my Facter (2.4.4) has been throwing this 
> error every run:
> 
> [jg4461@webdev-ispms ~]$ facter
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
> '/var/lib/mysql/mysql.sock' (2)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
> '/var/lib/mysql/mysql.sock' (2)
> 
> I initially assumed it was a bad custom fact but none of them attempt to 
> connect to MySQL. When running facts individually, it's mostly the built-in 
> Puppet facts that throw this error, including facts like $::disks and 
> $::memoryfree.
> 
> I can't figure out what is causing the problem. Any clues?
> 
> Thanks,
> Jonathan
> 
> -- 
> 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/55682F86.8010808%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/1D7A3F0C-C0D7-4983-A948-CEF06ADA6857%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter throwing MySQL errors

2015-05-29 Thread Martin Alfke
Try facter -p —debug or even facter -p —debug —trace to identify the broken 
fact which does the mysql connection.

hth,

Martin

On 29 May 2015, at 13:51, Jonathan Gazeley  
wrote:

> Yes, I tried running facter -p and it produces the same error. The same error 
> also crops up when puppet or mcollective execute facter too.
> 
> Thanks,
> Jonathan
> 
> 
> On 29/05/15 12:25, Martin Alfke wrote:
>> Have you tried running facter -p
>> This will also pull the pluginsynced facts.
>> 
>> (I am unsure which version has puppet facter)
>> 
>> 
>> On 29 May 2015, at 11:21, Jonathan Gazeley  
>> wrote:
>> 
>>> Hi folks,
>>> 
>>> Since upgrading to Puppet 3.8.1 my Facter (2.4.4) has been throwing this 
>>> error every run:
>>> 
>>> [jg4461@webdev-ispms ~]$ facter
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
>>> '/var/lib/mysql/mysql.sock' (2)
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
>>> '/var/lib/mysql/mysql.sock' (2)
>>> 
>>> I initially assumed it was a bad custom fact but none of them attempt to 
>>> connect to MySQL. When running facts individually, it's mostly the built-in 
>>> Puppet facts that throw this error, including facts like $::disks and 
>>> $::memoryfree.
>>> 
>>> I can't figure out what is causing the problem. Any clues?
>>> 
>>> Thanks,
>>> Jonathan
>>> 
>>> -- 
>>> 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/55682F86.8010808%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/556852A6.7020704%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/C88490DF-D2E4-4B2C-9797-BE10BEE0D90E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] permission denied on files

2015-06-17 Thread Martin Alfke
Hi Tim,

the agent wants to fetch the file
> puppet:///modules/bacula/monitor1/monitor1.mydomain.com.crt

But on the Master you are shooing us a file with the name:
> environments/production/modules/bacula/files/monitor1:
> total 8.0K
> -rw-r--r--. 1 puppet puppet 2.0K Jun 16 21:53 monitor1.jokefire.com.crt
> -rw-r--r--. 1 puppet puppet 3.2K Jun 16 21:53 monitor1.jokefire.com.key

mydomain.com <-> jokefire.com

Is this copy-n-paste or does the filename and the source name not match?

Best,
Martin


On 17 Jun 2015, at 04:20, Tim Dunphy  wrote:

> Hi all,
> 
>  I've setup a puppet module to install and keep the bacula backup system 
> running on a number of systems. 
> 
> 
> Part of the formula I've come up with is to transfer an SSL cert/key pair to 
> each host that uses the module. So that bacula can work over TLS. 
> 
>  I have this defined in my bacula config manifest:
> 
> file { "/etc/pki/tls/private/${::hostname}.mydomain.com.key":
>   notify  => Service["bacula-fd"],
>   owner => "bacula",
>   group => "bacula",
>   mode => 0400,
>   require => Package["bacula-client","bacula-common"],
>   source => 
> "puppet:///modules/bacula/${::hostname}/${::hostname}.mydomain.com.key",
> 
>  }
> 
> file { "/etc/pki/tls/certs/${::hostname}.mydomain.com.crt":
>   notify  => Service["bacula-fd"],
>   owner => "bacula",
>   group => "bacula",
>   mode => 0400,
>   require => Package["bacula-client","bacula-common"],
>   source => 
> "puppet:///modules/bacula/${::hostname}/${::hostname}.mydomain.com.crt",
> 
>  }
> 
> 
> 
> This has been working perfectly fine for a while now. But only on SOME hosts 
> that were recently added I'm getting permission denied errors on the keypairs 
> that I'm trying to send over. 
> 
> 
> Error: 
> /Stage[main]/Bacula::Config/File[/etc/pki/tls/certs/monitor1.mydomain.com.crt]:
>  Could not evaluate: Could not retrieve information from environment 
> production source(s) 
> puppet:///modules/bacula/monitor1/monitor1.mydomain.com.crt
> Error: 
> /Stage[main]/Bacula::Config/File[/etc/pki/tls/private/monitor1.mydomain.com.key]:
>  Could not evaluate: Could not retrieve information from environment 
> production source(s) 
> puppet:///modules/bacula/monitor1/monitor1.mydomain.com.key
> 
> And this is the weird part! All of the directories that I'm transferring keys 
> and certs from have identical ownership and permissions for both the working 
> and the non working hosts!
> 
> This is a directory listing of certs and keys that does NOT work:
> 
> environments/production/modules/bacula/files/monitor1:
> total 8.0K
> -rw-r--r--. 1 puppet puppet 2.0K Jun 16 21:53 monitor1.jokefire.com.crt
> -rw-r--r--. 1 puppet puppet 3.2K Jun 16 21:53 monitor1.jokefire.com.key
> 
> 
> And this is a listing from a directory containing certs and keys that DOES 
> work:
> 
> environments/production/modules/bacula/files/logs:
> total 8.0K
> -rw-r--r--. 1 puppet puppet 1.9K Apr 23 22:14 logs.jokefire.com.crt
> -rw-r--r--. 1 puppet puppet 3.2K Apr 23 22:14 logs.jokefire.com.key
> 
> And these are permissions on the directories themselves:
> 
> drwxr-xr-x. 2 puppet puppet 62 Jun 16 22:13 
> environments/production/modules/bacula/files/logs
> drwxr-xr-x. 2 puppet puppet 70 Jun 16 22:14 
> environments/production/modules/bacula/files/monitor1
> 
> Trouble is I can tell no difference between the working and non working 
> directories. 
> 
> If I run puppet  with the bacula module on the monitor1 host, I get the 
> error. If I run puppet with the bacula module on the logs host, everything 
> works fine!
> 
> I'm just wondering what I may be missing that could get rid of that error!
> 
> Thanks,
> Tim
> -- 
> GPG me!!
> 
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
> 
> 
> -- 
> 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/CAOZy0ekwcGN%2B609_K0pS6-zm%2B5tEpCpqkx_LHHmrhCk0cb-MsQ%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/487BF260-444D-4985-A118-FA20095A8CB2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to execute multiple script in puppet using bashrc file sourced.

2015-07-02 Thread Martin Alfke
Hi,
On 02 Jul 2015, at 10:29, Ayyanar  wrote:

> 1. I am executing  two shell script in puppet agent. 
> 2. In first shell script setting env variable in bashrc file. example export  
> "JAVA_HOME=/opt/jdk1.8.0_45"  >> bashrc file and i sourced bashrc file.

Do not do this via an exec. Have you taken a look on file_line (from std lib) 
or the inifile module from PuppetLabs?
https://forge.puppetlabs.com/puppetlabs/stdlib
https://forge.puppetlabs.com/puppetlabs/inifile

> 3.In second shell script changing  permission for JAVA_HOME. The permission 
> is not changed. Once i LogIn and LogOut in agent then i ran second  script 
> now the permission was changed.

What kind of permission are you going to change?
Permission on the directory?
Please use the file resource type for managing directories.

> 
> How to change permission without logout in agent Or Tell me some solution to 
> run multiple script and reflect env variable in puppet.

I suppose that you expect from second shell script that it uses standard 
environment.
This is not true. Puppet Exec resource type uses an empty environment.

hth,
Martin

> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/d3c4cc3f-d489-4d46-bfa7-9437e394970d%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/D8E5B3AA-9454-4A7B-A971-76B8AF0FE963%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] where is PC1 for Debian Jessie?

2015-07-06 Thread Martin Alfke
Hi Felix,

seems as if Jessie is missing the apt-sources.
Remove the sources line from /etc/apt/sources.list.d/
and rerun apt-get update

best,
Martin

On 06 Jul 2015, at 01:37, Felix Frank  wrote:

> Hi,
> 
> has anyone tried the PC1 on jessie yet? I just did the following:
> 
> wget http://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb
> dpkg -i puppetlabs-release-pc1-jessie.deb
> apt-get update
> 
> but I get
> 
> ...
> W: Failed to fetch http://apt.puppetlabs.com/dists/jessie/Release 
> Unable to find expected entry 'PC1/source/Sources' in Release file
> (Wrong sources.list entry or malformed file)
> 
> No puppetlabs packages come available to apt.
> 
> Thanks,
> Felix
> 
> On 06/09/2015 10:30 PM, Kylo Ginsberg wrote:
>> Hey all,
>> 
>> We're planning to release the next puppet-agent drop on June 22nd and
>> that should include Jessie packages/repos.
>> 
>> Meanwhile, you can grab jessie packages from our nightly builds, e.g.
>> 
>> http://nightlies.puppetlabs.com/puppet-agent/3a6740a0753b6fb20d27e45071eedc29dd8b436c/repos/deb/jessie/PC1/puppet-agent_1.1.0.170.g3a6740a-1jessie_amd64.deb
>> 
>> Builds only promote to nightly if they pass CI, but these are
>> nightlies, so standard caveats apply.
>> 
>> Thanks,
>> Kylo
> 
> -- 
> 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/5599BFB7.5090808%40Alumni.TU-Berlin.de.
> 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/7EE67E94-8478-407F-9CC3-26D8F134536E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Method to automatically/remotly clear out sign certificates

2015-07-15 Thread Martin Alfke
Hi Grant,

On 14 Jul 2015, at 20:03, Grant Schoep  wrote:

> Using Puppet 3.6 now, but will be upgrading to 3.8 shortly. All running on 
> CentOS 7
> 
> So I am setting up a small network to be used in testing application 
> deploys/OS.  The idea is basically this.
> 
> 1. Build out a new VM(based off Puppet classes).
> 2. Install software
> 3. Test that software
> 4. Blow away VM
> 
> So I have self signing turned on, so when the machine first installs and runs 
> puppet for the first time, it applies everything we want. All these steps is 
> happening "automatically" Which is why I have self signing turned on in this 
> case.
> 
> Now, the only hiccup, is that in this procedure, the ONE manual step I have, 
> is that I need to go onto the puppetCA server, and run a "puppet cert clean 
> hostname"
> Shortly this is going to be a real pain, as there will be a bunch more manual 
> machines. Short of setting  up a cron job, or using ssh'keys...
> 
> Is there a built in way to tell the PuppetCA server to just accept newly 
> generate keys... and "clean" the old one I guess this is sorta bypassing 
> the whole idea of signed keys, but then I have self signing turn on anyways...
> 
> If not, I'll probably just write a simple RESTful app that sits on teh 
> PuppetCA server, that I can "curl" to to tell it to remove the old host key. 
> I need to do things like that anyways in the building of of the VMs.

No need to do this. Puppet has a REST API built in.
You need to allow a remote system access to certificates via auth.conf
http://projects.puppetlabs.com/projects/1/wiki/Certificate_Authority_Rest_API
https://docs.puppetlabs.com/puppet/latest/reference/http_api/http_certificate.html

Best,
Martin

> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/3dda1ebb-e4c8-4fe7-b997-585475cf48f3%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/5CE8ADA2-E1DB-40BA-973B-1B8817DE099B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] String/Float comparison - Puppet and Facter

2015-08-03 Thread Martin Alfke

On 04 Aug 2015, at 00:39, Mike Reed  wrote:

> Hello all,
> 
> I've been trying to solve what seems to be a simple problem but have yet to 
> find the answer.  
> 
> I'm trying to do a comparison between the value of a fact and some arbitrary 
> value:
> 
> if ($::class == 'workstation') and ($::kernelmajversion <= '3.11') {

You compare two strings.
Have you tried versioncmp function instead?
versioncmp($::kernelmajversion, ‘3.11’)

https://docs.puppetlabs.com/references/latest/function.html#versioncmp


> notify {"My Kernel version is <= ${kernel_test_version} and I'm going to 
> upgrade" : }
> 
> file { 
> "/usr/src/linux-headers-${kernel_test_version}_${kernel_release_test_version}~precise1_all.deb"
>  :
>   mode   => '755',
>   ensure => 'present',
>   source => 
> "puppet:///modules/kernel/${kernel_test_version}_${kernel_release_test_version}~precise1_all.deb"
>  }
>   }
>   
>   elsif ($::class == 'workstation') and ($::kernelmajversion >= '3.11') {
> notify {"My Kernel version is >= ${kernel_test_version} so I don't need 
> to upgrade": }
>   }
> 
> 
> After invoking a puppet run, I can never get the evaluation of "if" to 
> actually take place and as a result, the elsif is invoked and regardless of 
> whether or not the kernel version is <= 3.11, the "if" statement is never 
> run.  From what I gather, this means that the evaluation of "if" is never 
> happening and the resulting elsif is automatically invoked.
> 
> I've also seen some errors that pertain to string/float comparisons and to my 
> knowledge, facter data is coming back as a string and my version number in 
> the "if" statement (3.11) is a float and therefore can't be compared due to 
> comparison rules of different data types.
> 
> Does anybody have some words of wisdom that may lead me to the correct syntax 
> for what I'm trying to achieve?
> 
> Thanks in advance to the community for the help.
> 
> Cheers,
> 
> Mike
> 
> 
> 
> -- 
> 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/5f9249a2-1bab-4f7e-84b5-f5fa6afd3ad7%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/9800277A-848F-4303-9C5E-E155EBAB918E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet noop and Rsync

2015-08-04 Thread Martin Alfke
Hi,
On 04 Aug 2015, at 10:26, Sergiu Cornea  wrote:

> Good morning guys,
> 
> When I am running Puppet in noop shouldn't Rsync do a dry-run in order to 
> show me what files have changed or if they are the same?

—noop refers to the agent only.
Everything else takes place as normal action:
- pluginsync
- storing exported resources
- compiling catalog

It is only the agent that checks for differences within catalog and the actual 
system and showing them instead of applying changes.

hth,
Martin

> 
> Or I am missing something?
> 
> Thank you,
> 
> Regards,
> Sergiu
> 
> This message and its attachments are private and confidential. If you have 
> received this message in error, please notify the sender and remove it and 
> its attachments from your system.
> 
> The University of Westminster is a charity and a company limited by 
> guarantee. Registration number: 977818 England. Registered Office: 309 Regent 
> Street, London W1B 2UW.
> 
> 
> -- 
> 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/90beeac3-a06c-461f-a4b7-3fab1132525d%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/0AE595FF-0393-44C1-91F2-9F731A9DC6CA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to make file_line autocreate files?

2015-08-04 Thread Martin Alfke
Hi,
On 04 Aug 2015, at 12:24, Arnaud Gomes-do-Vale  wrote:

> Hello,
> 
> I am trying to manage my dsh groups with Puppet. The way I'm trying to
> do this:
> 
> - each node has a block like this in its manifest:
> 
>  @@file_line { "${::fqdn} in dsh group ${group}":
>line => $::fqdn,
>path => "/etc/dsh/group/${group}",
>tag  => 'dsh',
>  }
> 
> - each dsh client collects those File_line resources.
> 
>  File_line <<| tag == 'dsh' |>>
> 
> Of course, this fails:
> 
> Error: /Stage[main]/Dsh::Client/File_line[my.host in dsh group mygroup]: 
> Could not evaluate: No such file or directory - /etc/dsh/group/mygroup
> 
> I can't manage every file in /etc/dsh/group/ explicitely, as the list is
> not fixed (basically I want to create whatever group nodes register
> themselves in).
> 
> How would you do this kind of thing? Modifying the file_line provider is
> probably the easiest way (basically, you just have to change method
> lines to return an empty list if the file does not exist), but I'm not
> sure of the possible side effects.

You could do the following:

@@file { “/etc/dsh/group/${group}”:
ensure => file,
tag => ‘dsh’,
}
@@file_line { "${::fqdn} in dsh group ${group}”:
line => $::fqdn,
path => "/etc/dsh/group/${group}”,
tag  => 'dsh’,
}
File <<|| tag == ‘ssh’ |>> -> File_line <<| tag == 'dsh' |>>

This creates files when required and takes care on the content with file_line

hth,
Martin

> 
> -- 
> Arnaud
> 
> -- 
> 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/87egjj8i7u.fsf%40ymagis.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/71C27D84-616B-4991-B602-7A310DF8E269%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to make file_line autocreate files?

2015-08-04 Thread Martin Alfke

On 04 Aug 2015, at 13:30, Arnaud Gomes-do-Vale  wrote:

> Martin Alfke  writes:
> 
>> @@file { “/etc/dsh/group/${group}”:
>>ensure => file,
>>tag => ‘dsh’,
>> }
>> File <<|| tag == ‘ssh’ |>> -> File_line <<| tag == 'dsh' |>>
>> 
>> This creates files when required and takes care on the content with file_line
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: A 
> duplicate resource was found while collecting exported resources, with the 
> type and title File[/etc/dsh/group/mobius-backoffice] on node 
> access.syltest.ymagis.com
> 
> I hadn't even tried it, but this is what I expected.

Ah. You are exporting on all nodes and you collect only on clients…
Seems as if you have multiple hosts within same group - which makes sense.
In this case it is not good to export the group file on the nodes.

Maybe you can do the following ( I am unsure whether the if ! defined will be 
validated properly on the client):

On the servers:

define dhs_group (
  $group
){
  if !defined(File[“/etc/dsh/group/${group}”]) {
file { “/etc/dhs/group/${group}”:
  ensure => file,
  tag => ‘dsh’,
}
file_line { “${title} in dsh group ${group}":
  line => $title,
  path => "/etc/dsh/group/${group}",
  tag  => 'dsh',
}
  }
}

@@dsh_group { $::fqdn:
  group => $group,
  tag => ‘dsh’,
}

On the Client:

Dsh_group << | tag == ‘ssh’ |>>


> 
> -- 
> Arnaud
> 
> -- 
> 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/87wpxb70kp.fsf%40ymagis.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/99A4DF94-2E11-48AF-91D3-2D11FA8673D2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Module spec testing

2015-08-05 Thread Martin Alfke
Hi Peter,
On 04 Aug 2015, at 21:37, Peter Berghold  wrote:

> Is there a newer set of documents on doing Spec testing of Puppet modules 
> than this link?  
> https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing
> 
> I am running into a brick wall getting this to work so I have to assume I'm 
> doing something wrong…

This should still be valid documentation.
It only refers to unit testing.
For acceptance testing you should take a look on beaker.

hth,
Martin

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


[Puppet Users] How to define own data types in Puppet 4?

2015-08-06 Thread Martin Alfke
Hi,

is there the possibility in Puppet 4 to provide own data types.

e.g. 
Fullpath $path

instead of
Regexp[/\/.*/] $path
or
Pattern[/\/.*/] $path

thanks,
Martin

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


Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-09 Thread Martin Alfke
Hi Eddie,

On 09 Aug 2015, at 16:25, Eddie Mashayev  wrote:

> Hi All, 
> 
> I have many servers spread in 3 different time zones USA (NY and San 
> Francisco) and also in ISR. Have 3 NTP servers, one NTP server in each 
> location. 
> https://forge.puppetlabs.com/puppetlabs/ntp module is letting you to insert 
> an array of NTP servers 
> 
> class { '::ntp': 
> servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], 
> } 
> 
> I can override this array but the problem is how to fit the correct NTP 
> server to each server in the different location. 
> In other words, how can I modified the puppet module to fit server to the 
> correct NTP Server by locations. 
> 
> For example - I thought using the server prefix name to choose the right NTP 
> server, for example if this server is located in NY so it prefix name is 
> ny-{server name} so I can fit it to NY NTP server but it look like a headache 
> to do it. 
> 
> Do you have any idea how can it be done in most efficient way with the NTP 
> module provided by puppetlabs. 

Several solutions:

1. write wrapper module per data center:

class ny_ntp {
  class { ‘::ntp’:
server => [‘ny_ntp.corp.com’],
  }
}

class sf_ntp {
  class { ‘::ntp’:
servers => [‘sf_ntp.corp.com’],
  }
}

class isr_ntp {
  class { ‘::ntp’:
   servers => [‘isr_ntp.corp.com’],
  }
}

use one of the the wrapper class within node classification

2. use hiera

provide a custom fact to identify location per server and put ntp::servers into 
the appropriate hiera data hierarchy.

Best,
Martin


> 
> 
> Thanks,
> EddieM
> 
> -- 
> 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/8cdf1ae0-46c8-4de6-bb06-9f42bdbd31ed%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/0CB6F615-A45C-408F-90B2-CCAEB9FCBC01%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Help with NTP module provided by puppetlabs

2015-08-10 Thread Martin Alfke

On 10 Aug 2015, at 09:54, Eddie Mashayev  wrote:

> Hi Martin, 
> 
> Thanks for the help. I used the second approach. 
> 
> 1) I’ve created custom fact to identify the server location (I’m using the 
> timezone fact) – Now I’m able to identify all my servers by location. 
> 2) I’m not sure about the second part “put ntp::servers into the appropriate 
> hiera data hierarchy” – I’m using Foreman and NOT Puppet enterprise if it 
> matters. Can you elaborate more how to implement it right, maybe add some 
> code if possible.

Hiera is not related to Puppet Enterprise.
Hiera is a data backend for automatic parameter lookups.
see http://docs.puppetlabs.com/hiera/latest/

You need to create a hiera.yaml config file.
The config file may look like this:

:backends:
  - yaml
:yaml:
  :datadir: ‘/etc/puppet/data’
:hierachy:
  - “nodes/#{::certname}”
  - “location/#{::timezone}”
  - global

In your hiera data directory you can provide yaml files for hierarchies (you 
don’t have to, but you can!)

/etc/puppet/data/
  - nodes/foo.bar.domain.com.yaml # has host specific parameters
  - location/CEST.yaml # has parameters for CEST timezone
  - location/PDT.yaml# has parameters for PDT timezone systems
  - global.yaml  # has global parameters

Hiera parses the data hierarchy and uses the first match.
To allow dynamic data lookup the variable names from the module have to be 
prefixed with the class name where they are used.
Note: this only works with parameterised classes, not with normal variables 
inside a manifest.

With foreman you should also be able to create a group setting based on 
timezone fact (I don’t have access to foreman right now, so I can not verify).

Best,
Martin

> 
> Thanks,
> EddieM
> 
> On Sunday, August 9, 2015 at 5:35:07 PM UTC+3, Martin Alfke wrote:
> Hi Eddie, 
> 
> On 09 Aug 2015, at 16:25, Eddie Mashayev  wrote: 
> 
> > Hi All, 
> > 
> > I have many servers spread in 3 different time zones USA (NY and San 
> > Francisco) and also in ISR. Have 3 NTP servers, one NTP server in each 
> > location. 
> > https://forge.puppetlabs.com/puppetlabs/ntp module is letting you to insert 
> > an array of NTP servers 
> > 
> > class { '::ntp': 
> > servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], 
> > } 
> > 
> > I can override this array but the problem is how to fit the correct NTP 
> > server to each server in the different location. 
> > In other words, how can I modified the puppet module to fit server to the 
> > correct NTP Server by locations. 
> > 
> > For example - I thought using the server prefix name to choose the right 
> > NTP server, for example if this server is located in NY so it prefix name 
> > is ny-{server name} so I can fit it to NY NTP server but it look like a 
> > headache to do it. 
> > 
> > Do you have any idea how can it be done in most efficient way with the NTP 
> > module provided by puppetlabs. 
> 
> Several solutions: 
> 
> 1. write wrapper module per data center: 
> 
> class ny_ntp { 
>   class { ‘::ntp’: 
> server => [‘ny_ntp.corp.com’], 
>   } 
> } 
> 
> class sf_ntp { 
>   class { ‘::ntp’: 
> servers => [‘sf_ntp.corp.com’], 
>   } 
> } 
> 
> class isr_ntp { 
>   class { ‘::ntp’: 
>servers => [‘isr_ntp.corp.com’], 
>   } 
> } 
> 
> use one of the the wrapper class within node classification 
> 
> 2. use hiera 
> 
> provide a custom fact to identify location per server and put ntp::servers 
> into the appropriate hiera data hierarchy. 
> 
> Best, 
> Martin 
> 
> 
> > 
> > 
> > Thanks, 
> > EddieM 
> > 
> > -- 
> > 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/8cdf1ae0-46c8-4de6-bb06-9f42bdbd31ed%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/d7398ad5-9b31-42e5-b3ee-d1eb889a8356%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/DD001BB3-D530-4509-AFDE-051381F58E29%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB and Debian Jessie

2015-08-14 Thread Martin Alfke
Hi Oli,

there are a couple of tickets at PL regarding jessie support as puppet server:
https://tickets.puppetlabs.com/browse/CPR-111?jql=text%20~%20%22jessie%22 


Unluckily no delivery date has been given so far.

Best,
Martin

> On 14.08.2015, at 10:19, Oliver Schad 
>  wrote:
> 
> Hi everybody,
> 
> does somebody know when the puppetdb packages will be available to
> build a complete puppet master/server based on Debian Jessie?
> 
> Best Regards
> Oli
> 
> -- 
> 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/20150814101922.7de7f81b%40dickeberta.automatic-server.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/9F2E09F2-0325-4981-B3DF-8B1A5CCDD7E8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to set puppet runintervel to neverrun?

2015-08-17 Thread Martin Alfke

On 17 Aug 2015, at 11:38, Ayyanar  wrote:

> I don't want to fetch the configuration for particular interval.
> 
> example default runintervel = 30min.
> I want to never fetch the configuration.
> How to set this value.
> 
The “default_runinterval” only has a meaning when you have the puppet agent 
running.
Maybe you want to ensure the service is stopped and removed from run levels?

service { ‘puppet’:
  ensure => stopped,
  enable => false,
}

or: (from defaults.rb):
:runinterval => {
  :default  => "30m",
  :type => :duration,
  :desc => "How often puppet agent applies the catalog.
  Note that a runinterval of 0 means \"run continuously\" rather than
  \"never run.\" If you want puppet agent to never run, you should start
  it with the `--no-client` option. #{AS_DURATION}",
},


> -- 
> 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/0f170975-28a0-438f-a88f-45684bf54fc8%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/A25F7BBD-B304-407A-A6C7-83BE5216E3D5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Inside a custom function, how can you know if noop is enabled ?

2015-09-06 Thread Martin Alfke
Hi Fred,
On 05 Sep 2015, at 19:36, Frédéric Lespez  wrote:

> Hi,
> 
> Inside a manifest, you can know if noop is enabled thanks to the $clientnoop 
> variable[1].
> But inside a custom function, how can you know it ?

$clientnnop is a fact [1]
You can access facts from functions e.g. by using lookupvar(‘clientnoop’) [2]

[1]https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#puppet-agent-facts
[2]https://docs.puppetlabs.com/guides/custom_functions.html#using-facts-and-variables

hth,
Martin

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


Re: [Puppet Users] params.pp vs Hiera

2015-09-09 Thread Martin Alfke
As a module developer I want to provide a module which will do sane defaults 
without forcing users to hiera.
Module developer (at the moment) put OS and application defaults into params.pp.
As a user you might want to override these defaults and specify them either as 
a parameter or via hiera.

On 09 Sep 2015, at 17:47, Dan White  wrote:

> Your observation is on target. 
> Now consider a module that has to support multiple operating systems, 
> multiple locations, et cetera, ad infinitum. You can either have a whopping 
> huge params.pp file that contains all the logic and possibilities, or you set 
> up Hiera to pick and choose for you, completely outside of your module and, 
> IMNSHO, much easier to maintain.
> 
> On Sep 9, 2015, at 8:45 AM, Sergiu Cornea  
> wrote:
> 
>> Hello guys,
>> 
>> I was wondering if someone can explain the difference between using the 
>> params.pp file and Hiera, as in my opinion they achieve the same thing using 
>> different methods.
>> 
>> For example, in the params.pp file you declare all or almost all the 
>> variables that are going to be used in your module and then call then in 
>> each manifest that you are using them and by using Hiera you declare the 
>> variables as you go in your manifest and set them using the Hiera file for 
>> that node.
>> 
>> Thank you,
>> 
>> Regards,
>> Sergiu
>> 
>> This message and its attachments are private and confidential. If you have 
>> received this message in error, please notify the sender and remove it and 
>> its attachments from your system.
>> 
>> The University of Westminster is a charity and a company limited by 
>> guarantee. Registration number: 977818 England. Registered Office: 309 
>> Regent Street, London W1B 2UW.
>> 
>> 
>> -- 
>> 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/308289d5-90b4-4dfb-b9e8-6afc687fa85a%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/6319666A-A094-45DF-88D5-415188B60A18%40icloud.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/F8CF1CA9-F5CB-4A59-884C-CC03D960C4D1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver error: no such file to load -- pg on node puppetmaster1

2015-09-17 Thread Martin Alfke

On 18 Sep 2015, at 04:08, rhpuppetu...@gmail.com wrote:

> Our puppet master used to run using apache passenger stack. We've recently 
> migrated from passenger to puppetserver. When i run puppet agent -vt on my 
> client, its showing the following error. 
> 
> Error 400 on server : could not autoload 
> puppet/parser/functions/get_location: no such file to load -- pg on node 
> puppetmaster1
> 
> puppet master --version : 3.7.5
> ruby --version : 1.8.7 patch level 374-2
> -
> #cat puppet/parser/functions/get_location.rb
> require 'rubygems'
> require 'pg'
> require ‘resolv'

It seems as if you are missing the pg ruby gem within puppet server:
sudo puppetserver gem install pg --no-ri --no-rdoc
see: 
https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown

Best,
Martin

> 
> module Puppet::Parser::Funtions
> 
> xx
> -
> 
> I would appreciate if someone help me fixing this issue.
> 
> 
> -- 
> 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/e86265cf-cf4b-4b92-9657-64d5137adf59%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/ED4DBBFB-AC4E-4845-9032-4334A50CB318%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 09:24, Vishal Goel  wrote:

> I am experiencing a very strange error in puppet. I have around 4-5 
> environments in my puppet codebase and whenever i add a new environment, it 
> doesn't work. Even thought the code of new environment added is almost 
> similar, it doesn't work.

Have you restarted the puppet master process after adding the static 
environment?
Maybe you want to have a look at environment path setting in puppet
https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html

> 
> Below is my puppet.conf file:
> 
> [main]
> logdir=/var/log/puppet
> vardir=/var/lib/puppet
> ssldir=/var/lib/puppet/ssl
> rundir=/var/run/puppet
> factpath=$vardir/lib/facter
> templatedir=$confdir/templates
> pluginsync=true
> masterport=8141
> 
> [master]
> reports = store
> environment_timeout = unlimited
> autosign = true
> 
> [newdcdeploy]
> modulepath = $confdir/modules
> manifest = $confdir/environments/newdcdeploy/manifests/site.pp
> 
> [newdcalerts]
> modulepath = $confdir/modules
> manifest = $confdir/environments/newdcalerts/manifests/site.pp
> 
> So, newdcdeploy is working and newdcalerts is not. And both have exact same 
> tree directory and content in files, only the names of environment are 
> different. Am I missing something here?
> 
> -- 
> 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/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%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/7161A8A3-D62C-47A7-9E0B-9BEF83C62D78%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 09:49, Vishal Goel  wrote:

> Yes, I always restart puppetmaster after adding a new environment or doing 
> any changes in code for that matter.
> 
> Also, below are the two processes that are running on the puppetmaster (used 
> ps -ef | grep puppet )
> puppet   29247 1  0 12:27 ?00:00:00 Rack: 
> /usr/share/puppet/rack/puppetmasterd 
This is the passenger process
>   
> 
> 
> puppet   30130 1  0 12:29 ?00:00:05 /usr/bin/ruby1.8 
> /usr/bin/puppet master
This is the ruby webrick process. Kill this one!

> 
> 
> 
> Maybe the problem is with them?
> 
> 
> On Friday, September 18, 2015 at 1:02:48 PM UTC+5:30, Martin Alfke wrote:
> 
> On 18 Sep 2015, at 09:24, Vishal Goel  wrote: 
> 
> > I am experiencing a very strange error in puppet. I have around 4-5 
> > environments in my puppet codebase and whenever i add a new environment, it 
> > doesn't work. Even thought the code of new environment added is almost 
> > similar, it doesn't work. 
> 
> Have you restarted the puppet master process after adding the static 
> environment? 
> Maybe you want to have a look at environment path setting in puppet 
> https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html
>  
> 
> > 
> > Below is my puppet.conf file: 
> > 
> > [main] 
> > logdir=/var/log/puppet 
> > vardir=/var/lib/puppet 
> > ssldir=/var/lib/puppet/ssl 
> > rundir=/var/run/puppet 
> > factpath=$vardir/lib/facter 
> > templatedir=$confdir/templates 
> > pluginsync=true 
> > masterport=8141 
> > 
> > [master] 
> > reports = store 
> > environment_timeout = unlimited 
> > autosign = true 
> > 
> > [newdcdeploy] 
> > modulepath = $confdir/modules 
> > manifest = $confdir/environments/newdcdeploy/manifests/site.pp 
> > 
> > [newdcalerts] 
> > modulepath = $confdir/modules 
> > manifest = $confdir/environments/newdcalerts/manifests/site.pp 
> > 
> > So, newdcdeploy is working and newdcalerts is not. And both have exact same 
> > tree directory and content in files, only the names of environment are 
> > different. Am I missing something here? 
> > 
> > -- 
> > 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/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%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/7828482b-22ea-438e-b136-2125193b2f59%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/3831C18A-40E1-49D8-AC81-059314910B78%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Some environments not working in puppet

2015-09-18 Thread Martin Alfke

On 18 Sep 2015, at 10:53, Vishal Goel  wrote:

> When I kill it and restart the puppetmaster, it is again created. And how do 
> i make sure that only passenger/ruby webrick runs the puppet master?

service puppetmaster will start the ruby process
This is the one you want to disable.

service apache|nginx|httpd will start the passenger rack application.
The web server name depends on
- which web server
- which distribution


> 
> On Friday, September 18, 2015 at 1:40:22 PM UTC+5:30, Martin Alfke wrote:
> 
> On 18 Sep 2015, at 09:49, Vishal Goel  wrote: 
> 
> > Yes, I always restart puppetmaster after adding a new environment or doing 
> > any changes in code for that matter. 
> > 
> > Also, below are the two processes that are running on the puppetmaster 
> > (used ps -ef | grep puppet ) 
> > puppet   29247 1  0 12:27 ?00:00:00 Rack: 
> > /usr/share/puppet/rack/puppetmasterd 
> This is the passenger process 
> > 
> >   
> > 
> > puppet   30130 1  0 12:29 ?00:00:05 /usr/bin/ruby1.8 
> > /usr/bin/puppet master 
> This is the ruby webrick process. Kill this one! 
> 
> > 
> > 
> > 
> > Maybe the problem is with them? 
> > 
> > 
> > On Friday, September 18, 2015 at 1:02:48 PM UTC+5:30, Martin Alfke wrote: 
> > 
> > On 18 Sep 2015, at 09:24, Vishal Goel  wrote: 
> > 
> > > I am experiencing a very strange error in puppet. I have around 4-5 
> > > environments in my puppet codebase and whenever i add a new environment, 
> > > it doesn't work. Even thought the code of new environment added is almost 
> > > similar, it doesn't work. 
> > 
> > Have you restarted the puppet master process after adding the static 
> > environment? 
> > Maybe you want to have a look at environment path setting in puppet 
> > https://docs.puppetlabs.com/puppet/3.8/reference/environments_configuring.html
> >  
> > 
> > > 
> > > Below is my puppet.conf file: 
> > > 
> > > [main] 
> > > logdir=/var/log/puppet 
> > > vardir=/var/lib/puppet 
> > > ssldir=/var/lib/puppet/ssl 
> > > rundir=/var/run/puppet 
> > > factpath=$vardir/lib/facter 
> > > templatedir=$confdir/templates 
> > > pluginsync=true 
> > > masterport=8141 
> > > 
> > > [master] 
> > > reports = store 
> > > environment_timeout = unlimited 
> > > autosign = true 
> > > 
> > > [newdcdeploy] 
> > > modulepath = $confdir/modules 
> > > manifest = $confdir/environments/newdcdeploy/manifests/site.pp 
> > > 
> > > [newdcalerts] 
> > > modulepath = $confdir/modules 
> > > manifest = $confdir/environments/newdcalerts/manifests/site.pp 
> > > 
> > > So, newdcdeploy is working and newdcalerts is not. And both have exact 
> > > same tree directory and content in files, only the names of environment 
> > > are different. Am I missing something here? 
> > > 
> > > -- 
> > > 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/a11ba4c8-f871-4d76-85fc-99a1948fcc7a%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...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/puppet-users/7828482b-22ea-438e-b136-2125193b2f59%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/a31eadf9-c400-4a2c-86e5-848702e78af1%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/C056E1F0-3D1E-4C13-8969-AF35471C8E19%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver error: no such file to load -- pg on node puppetmaster1

2015-09-20 Thread Martin Alfke

On 19 Sep 2015, at 21:14, rhpuppetu...@gmail.com wrote:

> Thanks Martin for replying. By the way, i'm following your seminars on 
> youtube and they are very helpful. The error still persists.
> 
> I've tried this earlier but command failed with the following error. 
> # puppetserver gem install pg --no-ri --no-rdoc
> Building native extensions. This could take a while...
> ERROR:  Error installing pg:
> ERROR: Failed to build gem native extension.
> 
>   java -jar /usr/share/puppetserver/puppet-server-release.jar -r 
> ./siteconf20150919-17955-hjabmk.rb extconf.rb
> 
> Error(s) occured while parsing command-line arguments: Unknown option: "-r"
> 
> <--- some options >
> 
> extconf failed, uncaught signal 1
> 
> <--- some output 2 lines —>

Seems to be a bug.
I can reproduce this error on Debian 7 with puppetserver 2.1.1

I have opened a ticket at PuppetLabs: 
https://tickets.puppetlabs.com/browse/SERVER-905

> 
> =====
> 
> 
> On Friday, September 18, 2015 at 1:51:44 AM UTC-5, Martin Alfke wrote:
> 
> On 18 Sep 2015, at 04:08, rhpupp...@gmail.com wrote: 
> 
> > Our puppet master used to run using apache passenger stack. We've recently 
> > migrated from passenger to puppetserver. When i run puppet agent -vt on my 
> > client, its showing the following error. 
> > 
> > Error 400 on server : could not autoload 
> > puppet/parser/functions/get_location: no such file to load -- pg on node 
> > puppetmaster1 
> > 
> > puppet master --version : 3.7.5 
> > ruby --version : 1.8.7 patch level 374-2 
> > - 
> > #cat puppet/parser/functions/get_location.rb 
> > require 'rubygems' 
> > require 'pg' 
> > require ‘resolv' 
> 
> It seems as if you are missing the pg ruby gem within puppet server: 
> sudo puppetserver gem install pg --no-ri --no-rdoc 
> see: 
> https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown
>  
> 
> Best, 
> Martin 
> 
> > 
> > module Puppet::Parser::Funtions 
> > 
> > xx 
> > - 
> > 
> > I would appreciate if someone help me fixing this issue. 
> > 
> > 
> > -- 
> > 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/e86265cf-cf4b-4b92-9657-64d5137adf59%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/bba04c2b-a309-4219-8a40-d381a7554be7%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/1E5042ED-BE05-4892-92BC-5DBF33B60BB4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver error: no such file to load -- pg on node puppetmaster1

2015-09-21 Thread Martin Alfke

On 20 Sep 2015, at 18:00, Martin Alfke  wrote:

> 
> On 19 Sep 2015, at 21:14, rhpuppetu...@gmail.com wrote:
> 
>> Thanks Martin for replying. By the way, i'm following your seminars on 
>> youtube and they are very helpful. The error still persists.
>> 
>> I've tried this earlier but command failed with the following error. 
>> # puppetserver gem install pg --no-ri --no-rdoc
>> Building native extensions. This could take a while...
>> ERROR:  Error installing pg:
>>ERROR: Failed to build gem native extension.
>> 
>>  java -jar /usr/share/puppetserver/puppet-server-release.jar -r 
>> ./siteconf20150919-17955-hjabmk.rb extconf.rb
>> 
>> Error(s) occured while parsing command-line arguments: Unknown option: "-r"
>> 
>> <--- some options >
>> 
>> extconf failed, uncaught signal 1
>> 
>> <--- some output 2 lines —>
> 
> Seems to be a bug.
> I can reproduce this error on Debian 7 with puppetserver 2.1.1
> 
> I have opened a ticket at PuppetLabs: 
> https://tickets.puppetlabs.com/browse/SERVER-905

I love PuppetLabs guys for their fast feedback and detailed descriptions:
Quoting Chris:
"I think this is probably expected behavior; Puppet Server runs JRuby, and 
JRuby doesn't support gems with native extensions. For most of the common gems 
that fall into this category, there is a suitable alternative that does work 
with JRuby. You can find general docs on this subject on the JRuby wiki, here:
https://github.com/jruby/jruby/wiki/C-Extension-Alternatives
It looks like, for pg, they're recommending the 
activerecord-jdbcpostgresql-adapter instead. Maybe that will be sufficient for 
your use case?"

In your case: puppetserver works as expected.
I will close the ticket with PL.

> 
>> 
>> =
>> 
>> 
>> On Friday, September 18, 2015 at 1:51:44 AM UTC-5, Martin Alfke wrote:
>> 
>> On 18 Sep 2015, at 04:08, rhpupp...@gmail.com wrote: 
>> 
>>> Our puppet master used to run using apache passenger stack. We've recently 
>>> migrated from passenger to puppetserver. When i run puppet agent -vt on my 
>>> client, its showing the following error. 
>>> 
>>> Error 400 on server : could not autoload 
>>> puppet/parser/functions/get_location: no such file to load -- pg on node 
>>> puppetmaster1 
>>> 
>>> puppet master --version : 3.7.5 
>>> ruby --version : 1.8.7 patch level 374-2 
>>> - 
>>> #cat puppet/parser/functions/get_location.rb 
>>> require 'rubygems' 
>>> require 'pg' 
>>> require ‘resolv' 
>> 
>> It seems as if you are missing the pg ruby gem within puppet server: 
>> sudo puppetserver gem install pg --no-ri --no-rdoc 
>> see: 
>> https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown
>>  
>> 
>> Best, 
>> Martin 
>> 
>>> 
>>> module Puppet::Parser::Funtions 
>>> 
>>> xx 
>>> - 
>>> 
>>> I would appreciate if someone help me fixing this issue. 
>>> 
>>> 
>>> -- 
>>> 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/e86265cf-cf4b-4b92-9657-64d5137adf59%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/bba04c2b-a309-4219-8a40-d381a7554be7%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/5B0F9E3D-E75B-42D2-9963-C8D9F2A59EB9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Ordering agent runs

2015-10-06 Thread Martin Alfke

On 06 Oct 2015, at 11:39, rjl  wrote:

> Hi All,
> I have an odd requirement to contend with. We have puppet clients that have 
> peers. While a catalog is being executed on one client, its peer must not 
> execute its catalog until the other is complete. Each client has only one 
> peer. Has anyone done something similar? I have not yet been able to derive a 
> good solution.
> 
> Scratching my head…

Hi rjl,

you might want to view or attend PuppetConf keynote.
https://puppetlabs.com/introducing-puppet-application-orchestration

Best,
Martin

> 
> Thanks in advance.
> 
> rjl
> 
> -- 
> 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/941fa895-4356-4bb3-bf03-264fee982d5b%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/AD749615-4ABC-429F-8C15-0B22EC6E05C5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Write arrays to an erb

2015-10-07 Thread Martin Alfke
Hi Sergiu,
On 07 Oct 2015, at 09:12, Sergiu Cornea  wrote:

> Hello guys,
> 
> I am passing 4 arrays in the Hiera file a: {a,b,c} b: {d,e,f} c: {g,h,i} d: 
> {j,k,l} which I am using them in an .erb template. However, when I am trying 
> to run Puppet it is complaining saying that cannot associate the file with 
> that name as it is already declared in a manifest.
> 
> I am using the create_resource function with Puppet 3.7 on Ubuntu 14.04.
> 
> Could someone please help me understand what I am doing wrong?

It would be useful to have the code pasted in gist.
Otherwise it will be difficult to help.

Best,
Martin

> 
> Thank you,
> 
> Regards,
> Sergiu
> 
> This message and its attachments are private and confidential. If you have 
> received this message in error, please notify the sender and remove it and 
> its attachments from your system.
> 
> The University of Westminster is a charity and a company limited by 
> guarantee. Registration number: 977818 England. Registered Office: 309 Regent 
> Street, London W1B 2UW.
> 
> 
> -- 
> 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/f2795f58-5d39-4ff3-9a44-79d2caeeae49%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/5AAB3874-0331-407D-AEDA-B3B568000405%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Confused after system upgrade - F22, Puppet 4.1.0-5

2015-10-08 Thread Martin Alfke
Hi Bret,

On 08 Oct 2015, at 09:08, Bret Wortman  wrote:

> So I upgraded our Puppet server to Fedora 22, which brought with it an 
> upgrade from Puppet 3.8-ish to 4.1.0-5. And as this wasn't expected (I should 
> have read and studied more -- it's definitely my fault), a few things have 
> confused me as I've started reading the Puppetlabs site for 4.1 documentation:
> 
> 1. It says that config files are now under /etc/puppetlabs/puppet, but the 
> RPM says it installed everything to /etc/puppet as always. Which is right?

The PuppetLabs website refers to PL packages.
Maybe Fedora Packages still have everything in /etc/puppet.

> 
> 2. My hiera config, or at least the default .yaml file I set up, isn't being 
> seen -- I suspect this is related to #1, but could something else be to 
> blame? The specific error when running a Puppet 4.1 client against my system 
> (actually, the agent running on the server since this was the first F22 
> upgrade we did) is:
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Evalutaiton Error: Error while evaluating a Function Call, Could not find 
> data item proxy in any Hiera data file and no default supplied at 
> /path/to/manifests/site.pp:25:10 on node puppetserver.foo.net
> 
> 3. Has Puppetlabs stopped providing RPMs at their yum server? I haven't seen 
> a full set since F20.

The last set of Packages has been made for Fedora 21:
https://docs.puppetlabs.com/puppet/latest/reference/system_requirements.html#fedora

> 
> Thanks,
> 
> 
> Bret Wortman
> 
> 
> -- 
> 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/0e9e133a-1d48-45c3-9a1f-ead296205868%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/3FCC3CBF-B118-4709-B515-2C8F07B4CEC2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet-4-able agent for RHEL7 on ppc64?

2015-10-13 Thread Martin Alfke
Hi Marc,

> On 24.09.2015, at 14:54, Marc Haber  wrote:
> 
> Hi,
> 
> I am looking for a puppet agent rpm that can run against a puppet 4
> server (and can use its features) for RHEL 7 on ppc 64. On
> yum.puppetlabs.com, I can only find binaries for agent 1.2.4 (latest
> version) for x86_64 and i386, and the corresponding SRPM directories
> do only have puppetdb and puppetserver src.rpms.

PL released their build chains:
[1] https://github.com/puppetlabs/ezbake 
[2] https://github.com/puppetlabs/packaging 

[3] https://github.com/puppetlabs/vanagon 
.
[4] https://github.com/puppetlabs/vmpooler 

[5] https://tickets.puppetlabs.com/browse/CPR 

[6] http://stahnma.github.io/vanagon/doc/ 



> 
> What can I do to be able to use puppet 4 with my ppc64 LPAR systems?

Maybe you can install ruby and use the puppet4 and facter gems.

Best,
Martin

> 
> Greetings
> Marc
> 
> -- 
> -
> Marc Haber | "I don't trust Computers. They | Mailadresse im Header
> Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
> 
> -- 
> 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/20150924125447.GI23456%40torres.zugschlus.de.
> 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/49D0A8B8-5BFB-4EAB-92D2-DABDFC9F075C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Testing yaml files being passed as parameters using rspec-puppet

2015-11-10 Thread Martin Alfke
Hi,
On 06 Nov 2015, at 14:38, choffee  wrote:

> I have a define which takes a yaml file as a parameter and want to check that 
> my template creates valid yaml.
> 
> I am currently using regexp to test bits of it like so
> 
>   should contain_mydefine('foo').with_yaml_content(/---\s+-part1/m)

You can directly access the content attribute:

content = catalogue.resource(‘mydefine', ‘foo').send(:parameters)[:content]

Then you can use default spec matchers for checking what is in local variable 
content.
I am unsure how to check for valid yaml.

Best,
Martin



> 
> It would be nice to be able to do
> 
>   should contain_mydefine('foo').with_yaml_content.valid_yaml()
> 
> Is there a simple way to check this?
> 
> As an alternative, if I assign the yaml to a local available is there a way 
> in rspec to check that value?
> 
> Thanks
> 
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/79782f5f-f006-4094-a29e-3414ea7ba5c8%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/05756EAC-00D5-4869-AA38-3A27E8DA0404%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent --tag (and hiera) during Scientific Linux installation

2015-11-10 Thread Martin Alfke
Hi Arnau

On 10 Nov 2015, at 13:19, Arnau  wrote:

> …

> in hiera defaults.yaml I've also defined a couple of nagios::client[1] 
> variables (for not including selinux):
> 
> $cat hieradb/defaults.yaml
> [...]
> 
> nagios
> ::client::selinux: 'false'
> 
> nagios
> ::client::selinux_enforced: 'false'
> [...]
> *Default for selinux is true.

Are your hiera data generic or specific to environments?

> …

> * Hiera works and returns the expected values:
> #  hiera -c /etc/puppet/hiera.yaml -d  classes environment=basic_conf 
> clientcert=XX

Here you make use of the ::environment.

> …

> My kickstart posinstall section runs puppet like:
> puppet agent --test --tags=kickstart::bootstrap --report --pluginsync 
> --no-noop 

Here you do not specify the environment.

> 
> I expect puppet to run, not include selinux and ONLY configure ntp
> But it gives me an error (failed catalog) because selinux::audit2allow is an 
> invlaid resource type. (which means that the nagios variables are not picked 
> up from hiera (false)  so selinux is included)
> If I reboot the node, and run the same exact puppet agent line, then puppet 
> runs (no selinux complain) and only NTP class is configured:
> #  /usr/bin/puppet agent --test --environment=basic_cb_conf 
> --tags=kickstart::bootstrap

Here you again use the environment.

Can you provide the content and location of your hiera.yaml file?


Best,
Martin

> …

> So, what are (or could be) the differences between puppet runs inside the 
> kickstart postinstall process and puppet runs outside it?
> Why is hiera ignored?
> 
> [1] (https://forge.puppetlabs.com/thias/nagios)
> 
> TIA,
> 
> -- 
> 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/CAM69jx_uAbfBc1aU0hYUv%3DGfkGu1oTCx%3D1%3DkgS1JUE1ifsxMxQ%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/05700C27-DDB2-49D6-B44B-3E0D12A609B1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent --tag (and hiera) during Scientific Linux installation

2015-11-10 Thread Martin Alfke
Hi Arnau,

On 10 Nov 2015, at 14:23, Arnau  wrote:

> 
> 
> 2015-11-10 14:39 GMT+01:00 Martin Alfke :
> Hi Arnau
> Hi Martin,
>  
> Are your hiera data generic or specific to environments?
> 
> specific to hiera.
>  
> > …
> 
> > * Hiera works and returns the expected values:
> > #  hiera -c /etc/puppet/hiera.yaml -d  classes environment=basic_conf 
> > clientcert=XX
> 
> Here you make use of the ::environment.
> 
> Yes, because the default environment is not "basic_conf" .
> 
>  
> > My kickstart posinstall section runs puppet like:
> > puppet agent --test --tags=kickstart::bootstrap --report --pluginsync 
> > --no-noop
> 
> Here you do not specify the environment.
> 
> I've tried to run the puppet command + --environment=basic_conf inside the 
> kickstart process and it still gives me the error. I should have pasted the 
> complete command and not this one. Sorry.
> 
>  
> The reason why I specify the environment is becasue the default env in the 
> puppet master is not basic_conf. The node env  (AND ONLY NODE ENV) is defined 
> in foreman. (yes, maybe I should have talked about foreman before, but, as 
> the same command with/without environment fails, I did not consider that 
> foreman was interefering with my current issue).

I see two possible entry points for your problem:

1. environment specific hiera data
according to your hiera.yaml file you have hieradata per environment.
can you please cross check that the nagios::client::selinux key is set to false 
in all environment default.yaml files.

2. foreman providing data to modules.
check whether you set the selinux parameter for the nagios::client class in 
foreman based upon environments.


> 
>  
> Can you provide the content and location of your hiera.yaml file?
> 
>  # cat /etc/puppet/hiera.yaml
> ---
> :backend:
>   - yaml
> :hierarchy:
>   - "%{environment}/hieradb/global"
>   - "%{environment}/hieradb/cert/%{clientcert}"
>   - "%{environment}/hieradb/net/%{netlocation}"
>   - "%{environment}/hieradb/location/%{location}"
>   - "%{environment}/hieradb/env/%{environment}"
>   - "%{environment}/hieradb/dist/%{operatingsystem}/%{operatingsystemrelease}"
>   - 
> "%{environment}/hieradb/dist/%{operatingsystem}/%{operatingsystemmajrelease}"
>   - "%{environment}/hieradb/dist/%{operatingsystem}"
>   - "%{environment}/hieradb/dist/%{lsbdistid}/%{lsbdistrelease}"
>   - "%{environment}/hieradb/dist/%{lsbdistid}/%{lsbmajdistrelease}"
>   - "%{environment}/hieradb/dist/%{lsbdistid}"
>   - "%{environment}/hieradb/defaults"
> 
> :yaml:
>   :datadir: "/var/lib/puppet-deploy/XX-environments"
> 
> 
> 
> 
> Best,
> Martin
>  
> Cheers,
> Arnau
> 
> -- 
> 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/CAM69jx-JRhRtHhrSo92nW%3DgkQE4Sw7G1RVhnvh-JOjx8%2BX6axA%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/C3112600-AAB0-4E9F-8185-69171373D824%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent --tag (and hiera) during Scientific Linux installation

2015-11-11 Thread Martin Alfke

On 10 Nov 2015, at 20:33, Arnau  wrote:

> Hi,
> 
> >
> > I see two possible entry points for your problem:
> >
> > 1. environment specific hiera data
> > according to your hiera.yaml file you have hieradata per environment.
> > can you please cross check that the nagios::client::selinux key is set to 
> > false in all environment default.yaml files.
> 
> The only env where it's defined is the one I'm using.

Maybe that is the reason.
Can you please have a look at the nagios::client code and check whether there 
is a default set for $selinux?

> But, in any case,if I specify the env in command line, puppet should not mix 
> data from other envs, am I wrong?

Data is hiera. Env is puppet code.
When using env in hiera, then data should not get mixed among several 
environments.
> 
> > 2. foreman providing data to modules.
> > check whether you set the selinux parameter for the nagios::client class in 
> > foreman based upon environments.
> Foreman has no parameter defined. Only the env.
OK.
> 
> What really confuses me is the fact that everything wlrks as expected once 
> the node has been rebooted. i must compare facter outputs, and anything else?
The only information the node sends to the master is: facts.
Maybe you can verify whether facts change after the reboot.

> 
> Also, i'll try to remlve all hierarchy entries except defaults.yaml, just to 
> be sure that that's the only file checked.
> 
> I've been trying to download the catalog, with no luck. If the compilation 
> fails, is there any way for downloading it anyway?
> 
> Thanks,
> Arnau
> 
> -- 
> 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/CAM69jx9VhnXR6S2J8uoosWy8bVDBGE27%2BeYSguBaa4z6BSfOiw%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/9D7BBE07-8771-4A95-A33F-11F9BEC43F19%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to enable repositories for forge modules?

2015-11-15 Thread Martin Alfke
Hi Haani,

On 15 Nov 2015, at 06:58, Haani Niyaz  wrote:

> Our SOE document states that all repositories should be disabled by default 
> and enabled on installing a package. So when we write modules our package 
> resource more or less looks like this:
> 
>  package { $package_name:
>  ensure => "${package_version}-${release_version}",
>  install_options => [ {'--disablerepo' => "*"}, { '--enablerepo' => 
> "$releases_repo" } ],
>  notify => Class['::apache::service'],
>  }
> 
> In our base profile (which is included in every role) a module ensures that 
> all repos are disabled. However this has proven to be a problem when using 
> forge modules where it seems to expect the repositories will be enabled by 
> default. 
> 
> One untested suggestion was to use the package resource default statement and 
> set the install option to enable the repositories. Example shown below:
> 
> 
> class profiles::phpwebserver {
> 
>  Package{
>   install_options => [ {'--disablerepo' => "*"}, { '--enablerepo' => "*" } ],
>  }

put this resource default into site.pp
Then the resource default is set globally and not only in class namespace.

Be aware that module developers might set install_options by themselves which 
might overwrite your default setting.

Best,
Martin

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


Re: [Puppet Users] Regarding Puppet agent

2017-09-03 Thread Martin Alfke
Hi,

> On 02 Sep 2017, at 18:20, sravan199...@gmail.com wrote:
> 
> Hello,
> 
> I installed puppet open source.My master is on Ubuntu 14.04 and also my agent 
> is also on Ubuntu 14.04.
> 
> When i run service puppetserver status on my maters it's saying pupperserver 
> is running.
> 
> When i run service puppet status on my agent it's saying agent is running
> 
> But when i type puppet agent -t on my agent it's saying :
> 
> Warning: Unable to fetch my node definition, but the agent run will continue:
> Warning: Connection refused - connect(2)

1. what is the fqdn of your puppet server?
2. is there an entry in /etc/puppetlabs/puppet/puppet.conf agent section 
specifying which server to connect to?
[agent]
server = server.domain.tld
3. local firewall rules?
4. can the system resolve the servername to an IP address?

> 
> when i first did puppet cert list on my puppet master i got this agent list 
> and when i sign and i started doing puppet agent -t on agent it's saying 
> above error.
> 
> 
> Any Help?
> 
> 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/1ed4dbda-9605-423e-9a74-c5108d03450b%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/084690EC-A5D2-4E84-81D7-8717D4E9FAE8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] shell file but getting copied do destination

2017-09-11 Thread Martin Alfke

> On 09 Sep 2017, at 18:48, viveks8...@gmail.com wrote:
> 
> Hi,
> 
> following is my task file which i call from deployment_task.yaml
> 
> file { '/tmp/filename.sh'
> path => '/tmp’

Must must have the complete file name, not only the directory.
https://docs.puppet.com/puppet/latest/type.html#file-attribute-path

> .
> . source => puppet:///midules/pluginname/filename.sh,
> } ->
> 
> exec {'/tmp/filename.sh'
> command => '/tmp/filename.sh'
> path => '/usr/bin:/bin'
> }
> 
> my problem is that neither filename.sh is getting copied into /tmp/ folder 
> nor(and probably that's why) commands is not getting executed
> 
> please help me asap, I have already defaulted on deadline twice.
> 
> thanks,
> Vivek
> 
> -- 
> 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/966fd69f-9e35-4d7e-bff1-0493432757c5%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/09C2FE2F-4FE1-41D0-A052-4A79514FF200%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


<    1   2   3   4   5   >