[Puppet Users] Re: Puppet-dashboard not importing automatically the reports

2014-10-15 Thread Juan Sierra Pons
More info about this issue:

On the working dashboard installation the logs says:
Processing ReportsController#upload (for 10.X.X.X at 2014-10-15 03:28:38) [POST]
  Parameters: {action=upload, controller=reports}
Completed in 40ms (View: 0, DB: 13) | 200 OK
[https://dashboard.example.org/reports/upload]

But I cannot find the same line on the not working dashboard. So I
think the problem is this, the puppetmaster not pushing the reports to
the dashboard. In both cases the puppetmaster and the dashboard live
on the same server.

The puppet.conf on the working one is (this also have the puppetdb):
[...]
reporturl = https://dashboard.example.org/reports/upload
reports = store, http, puppetdb
[...]

The puppet.conf on the not working one is:
[...]
reporturl = https://puppet-dashboard.example.org/reports/upload
reports = store, http
[...]

What I am missing?

Best regards

--
Juan Sierra Pons j...@elsotanillo.net
Linux User Registered: #257202
Web: http://www.elsotanillo.net Git: http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--

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


[Puppet Users] how to force tomcat restart using puppet kick and service type ?

2014-10-15 Thread Richard
 I'm using the puppetlab-tomcat module.when i want to start tomcat ,i 
will kick the agent to run this code.

tomcat::service{'default':

  service_ensure = true,

  catalina_base  ='/opt/apache-tomcat/tomcat',

}

 if i want to stop,i will change the service_ensure to false.
 but if i want to restart tomcat in one .pp file, just run kick command 
only once, i have to define two service because service name can't be 
duplicate declared. so i change the code:

tomcat::service{'default':
  service_ensure = false,
  catalina_base  ='/opt/apache-tomcat/tomcat',
}
-
tomcat::service{'restart':
  service_ensure = true,
  catalina_base  ='/opt/apache-tomcat/tomcat',
}

after i using this code, i find i can't stop tomcat using this code

tomcat::service{'default':

  service_ensure = false,

  catalina_base  ='/opt/apache-tomcat/tomcat',

}

 because the service named restart is running, not default, so i can't 
stop the tomcat service. so i want to know how to restart tomcat  just 
using only one kick command.

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


[Puppet Users] Re: pkgutil package provider (solaris)

2014-10-15 Thread Frederic Conrotte
Hello

Like many enterprises, we have an heterogeneous infrastructure with some 
CentOS and Solaris machines.

I was wondering if there are existing plans about creating for Solaris the 
equivalent of the yumrepo type ?

https://docs.puppetlabs.com/references/latest/type.html#yumrepo

Something like pkgrepo ?

Best regards

Frederic

Le mercredi 3 novembre 2010 09:58:59 UTC+1, Rudy Gevaert a écrit :

 Dear group, 

 Those who are running Solaris might be interested that there is some 
 movement to create a pkgutil provider so you can install packages from 
 opencsw. 

 Those who are interested, please see: 
 http://projects.puppetlabs.com/issues/4258 

 Thanks! 

 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/575dc1a6-fddd-4e2c-8441-1f5eb318f371%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PDB 1.6: Queries filtering facts with large values might fail

2014-10-15 Thread ak0ska
Hello,

We are running PuppetDB 1.6.0. We have fact 'a' in puppetdb that has large 
numbers occasionally, such as 2930266584. When we launch a query 
/v3/facts/a with filter '[, value, 1950341121]' it returns code 200 
with an empty body, while puppetdb.log shows a new error:

2014-10-15 11:20:41,293 ERROR [clojure-agent-send-off-pool-15310] 
 [v3.facts] Error streaming response
 org.postgresql.util.PSQLException: ERROR: value 2930266584 is out of 
 range for type integer


The table stores values in strings, and apparently the query cannot convert 
large values into integers. Could someone please check if this issue also 
exists with newer versions?

Best regards,
Akos Hencz

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


Re: [Puppet Users] PDB 1.6: Queries filtering facts with large values might fail

2014-10-15 Thread Ken Barber
 We are running PuppetDB 1.6.0. We have fact 'a' in puppetdb that has large
 numbers occasionally, such as 2930266584. When we launch a query /v3/facts/a
 with filter '[, value, 1950341121]' it returns code 200 with an empty
 body, while puppetdb.log shows a new error:

 2014-10-15 11:20:41,293 ERROR [clojure-agent-send-off-pool-15310]
 [v3.facts] Error streaming response
 org.postgresql.util.PSQLException: ERROR: value 2930266584 is out of
 range for type integer


 The table stores values in strings, and apparently the query cannot convert
 large values into integers. Could someone please check if this issue also
 exists with newer versions?

In future versions the coercement is gone and types are supported. So
in this case to do something similar you must be using structured
facts and you must store the values as integers, they get stored in a
big int column, and the comparison will be uncoerced. Only signed big
int is supported today, there is no support for arbitrary precision
decimals.

ken.

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


Re: [Puppet Users] PDB 1.6: Queries filtering facts with large values might fail

2014-10-15 Thread ak0ska
Thanks for the explanation!

On Wednesday, October 15, 2014 1:36:49 PM UTC+2, Ken Barber wrote:

  We are running PuppetDB 1.6.0. We have fact 'a' in puppetdb that has 
 large 
  numbers occasionally, such as 2930266584. When we launch a query 
 /v3/facts/a 
  with filter '[, value, 1950341121]' it returns code 200 with an 
 empty 
  body, while puppetdb.log shows a new error: 
  
  2014-10-15 11:20:41,293 ERROR [clojure-agent-send-off-pool-15310] 
  [v3.facts] Error streaming response 
  org.postgresql.util.PSQLException: ERROR: value 2930266584 is out of 
  range for type integer 
  
  
  The table stores values in strings, and apparently the query cannot 
 convert 
  large values into integers. Could someone please check if this issue 
 also 
  exists with newer versions? 

 In future versions the coercement is gone and types are supported. So 
 in this case to do something similar you must be using structured 
 facts and you must store the values as integers, they get stored in a 
 big int column, and the comparison will be uncoerced. Only signed big 
 int is supported today, there is no support for arbitrary precision 
 decimals. 

 ken. 


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


[Puppet Users] Re: One puppet run divided to two puppet runs

2014-10-15 Thread jcbollinger
I'm uncertain which differences between the two logs you find significant.  
They do appear to have been recorded at different log levels -- that 
explains why one has Updated: entries and the other does not.  The 
various packages are managed in different order in the two runs, but Puppet 
resource ordering is not guaranteed to be consistent (subject to several 
caveats).  The two runs show somewhat different sets of resources being 
updated, but even if the nodes receive identical catalogs, which resources 
are updated will vary depending on which resources need to be updated.

Anyway, you cannot parallelize catalog runs.  The agent employs a lock file 
to ensure that you do not do so.  This is because multiple concurrent runs 
can conflict with each other.  Even if Puppet wanted to parallelize 
internally -- and in principle it could do so to some extent -- it is far 
trickier than just arbitrarily splitting resources among threads.  
Moreover, the gain achievable that way is unclear, but likely to be 
variable and small, as most of the time-consuming operations the agent 
performs are I/O bound.

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


[Puppet Users] Re: LoadError: no such file to load -- facter/util/file_read

2014-10-15 Thread Spriya
Hi Craig,

I am using PE. My installation was all in one(master,database,console). Yes 
 i have more than one ruby installed.

*ruby -v*
*ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]*


*$ cd /opt/puppet/bin*
*./ruby -v*
*ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]*


let me know how to troubleshoot this issue.


On Tuesday, October 14, 2014 7:54:04 PM UTC-4, Craig White wrote:

 how did you install puppet?  Do you have more than one install of ruby on 
 your system?  Is it possible that when you invoke the interactive ruby 
 console (irb) that it starts a ruby binary that has nothing to do with your 
 puppet install?

 On Tuesday, October 14, 2014 4:41:07 PM UTC-7, Spriya wrote:

 Hi Craig,

 even if i do  require facter. It is throwing me error.

 *irb(main):002:0 require 'facter'*
 *LoadError: no such file to load -- facter*
 *from (irb):2:in `require'*
 *from (irb):2*
 *from :0*


 On Tuesday, October 14, 2014 5:22:26 PM UTC-4, Craig White wrote:

 I don't see a 'file_read' method for Factor::Util

 Facter::Util.methods
 = [:freeze, :===, :==, :=, :, :=, :, :=, :to_s, 
 :included_modules, :include?, :name, :ancestors, :instance_methods, 
 :public_instance_methods, :protected_instance_methods, 
 :private_instance_methods, :constants, :const_get, :const_set, 
 :const_defined?, :const_missing, :class_variables, :remove_class_variable, 
 :class_variable_get, :class_variable_set, :class_variable_defined?, 
 :public_constant, :private_constant, :module_exec, :class_exec, 
 :module_eval, :class_eval, :method_defined?, :public_method_defined?, 
 :private_method_defined?, :protected_method_defined?, :public_class_method, 
 :private_class_method, :autoload, :autoload?, :instance_method, 
 :public_instance_method, :psych_yaml_as, :yaml_as, :psych_to_yaml, 
 :to_yaml_properties, :to_yaml, :nil?, :=~, :!~, :eql?, :hash, :class, 
 :singleton_class, :clone, :dup, :initialize_dup, :initialize_clone, :taint, 
 :tainted?, :untaint, :untrust, :untrusted?, :trust, :frozen?, :inspect, 
 :methods, :singleton_methods, :protected_methods, :private_methods, 
 :public_methods, :instance_variables, :instance_variable_get, 
 :instance_variable_set, :instance_variable_defined?, :instance_of?, 
 :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, 
 :respond_to_missing?, :extend, :display, :method, :public_method, 
 :define_singleton_method, :object_id, :to_enum, :enum_for, :psych_y, 
 :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__]

 Craig

 On Tuesday, October 14, 2014 2:01:15 PM UTC-7, Spriya wrote:

 Hi,

 I am am trying to execute my puppet facts using irb. so when i use irb. 
 It is throwing me error. No such file to load -- facter/util/file_read

 *$irb*
 *irb(main):001:0 require 'facter/util/file_read'*
 *LoadError: no such file to load -- facter/util/file_read*
 *from (irb):1:in `require'*
 *from (irb):1*
 *from :0*
 *irb(main):002:0 require 'facter'*
 *LoadError: no such file to load -- facter*
 *from (irb):2:in `require'*
 *from (irb):2*
 *from :0*

 Anyone help me



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b2c116b7-7f7f-47b7-83f6-1d270bf9c82a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs-corosync: cs_property doesn't get set

2014-10-15 Thread ge...@riseup.net
Hi,

On 14-10-08 22:57:33, ge...@riseup.net wrote:
 I'm running Debian wheezy, puppet version 2.7.23. I wanted to have a
 look at the corosync module provided by puppetlabs [1].

 [...]
 
 After the agent run, corosync and pacemaker gets installed, and the
 cluster gets set up. However, despite values for cs_property being set
 (incorrect?), these values aren't being recognized, which leads to
 ressources being unuseable. The cluster reports:

Using puppet 3.7.1-1 out of Debian jessie fixes this. I think, I won't
debug this further.

Cheers,
Georg

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


Re: [Puppet Users] Re: puppetlabs-corosync: cs_property doesn't get set

2014-10-15 Thread ge...@riseup.net
Hi James,

On 14-10-13 19:58:02, James Eckersall wrote:
 I had issues when I was first using this module with the primitives.

After fixing the issue with cs_property, I'm now running into the same
problem like you. Despite cs_primitive being defined in puppet, it
doesn't get created. Did you change the code somehow to fix this?

Thanks,
Georg

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


[Puppet Users] Dynamic environments with r10k using svn instead of git

2014-10-15 Thread Juan Sierra Pons
Hi,

I feel pretty comfortable using dynamic environments using r10k and git.
BUT I have been asked to try using svn instead of git

At the Puppetfile level should be pretty easy as it is well documented [1]

mod 'apache',
  :svn = 'https://github.com/puppetlabs/puppetlabs-apache/trunk',
  :rev = '154'

But I don't know how to (if it is possible) configure the r10k.yaml
file. I have searched on the Internet but I haven't found a valid
example. So I have supposed that the r10k should be like this:

# location for cached repos
:cachedir: '/var/cache/r10k'

:sources:
  :base:
remote: 'https://svnserver/svn/puppet/'
basedir: '/tmp/svn'

# purge non-existing environments found here
:purgedirs:
  - '/tmp/svn'

Then running the deploy command gives the following error

r10k deploy environment --config /etc/r10k-svn.yaml
Faraday: you may want to install system_timer for reliable timeouts
[R10K::TaskRunner - ERROR] Task
#R10K::Task::Deployment::DeployEnvironments:0x7f304601a428 failed
while running: Couldn't update git cache for
https://svnserver/svn/puppet/: fatal: HTTP request failed

Does r10k support svn at r10k.yaml level?
Any idea what am I doing wrong?

Thanks for your time

Best regards

[1] https://github.com/adrienthebo/r10k/blob/master/doc/puppetfile.mkd
--
Juan Sierra Pons j...@elsotanillo.net
Linux User Registered: #257202
Web: http://www.elsotanillo.net Git: http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--

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


[Puppet Users] [SOLVED]Re: Puppet-dashboard not importing automatically the reports

2014-10-15 Thread Juan Sierra Pons
Hi again,

Finally I have found the problem. When I migrated the dashboard from
webrick to be served by apache I misconfigured the dashboard.conf (at
apache level) so I was restricting the puppetmaster to PUT the reports
on the proper URL.

Location /reports/upload
  Limit POST
# Configuration restricts HTTP actions to POST only
Order allow,deny
Allow from localhost
Allow from localhost.localdomain
Allow from 127.0.0.1
Satisfy any
/Limit

So finally I wasn't the puppet.conf configuration but the apache configuration.

I hope it helps to others having same problem on the future.

Best regards

--
Juan Sierra Pons j...@elsotanillo.net
Linux User Registered: #257202
Web: http://www.elsotanillo.net Git: http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00  6E66 E934 3406 A110 F4FE
--

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


Re: [Puppet Users] Re: puppetlabs-corosync: cs_property doesn't get set

2014-10-15 Thread james . eckersall
Hi,

In the cs_primitive provider, I added debug code to write the updated var 
to a file in /tmp.  I then tried applying that with crm update as the 
provider does.  Crm was returning errors to me that the provider wasn't.
I was able to use that to determine that I didn't have all the params set 
correctly.  For some reason, the provider wasn't reporting invalid params 
to me.
I've since learned about ruby pry, so that would probably be better than 
writing debug info to a file.

Regards
J

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


Re: [Puppet Users] Re: Passing Parameters to Powershell

2014-10-15 Thread Paul Ponzeka
Hopefully this is my last question.  How do i get the variable that passes 
through to powershell to be a proper array?  The reason is that i need to 
run a foreach loop on it, but it sees the variable as one long item instead 
of multiples if its configured as such:

$forwarders = [1.1.1.1,2.2.2.2]

On Monday, October 13, 2014 1:48:46 PM UTC-4, Paul Ponzeka wrote:

 Josh, your a god among men.  Thank you so much.  It was the literal string 
 for the variable that resolved it.  

 On Monday, October 13, 2014 1:05:39 PM UTC-4, Josh Cooper wrote:

 Hi Paul,

 On Mon, Oct 13, 2014 at 7:15 AM, Paul Ponzeka ponz...@gmail.com wrote:

 Thanks for this rob.  I still cannot get the variable to pass into the 
 script.  Now i have the *setdnsforwarders.ps1.erb* template, 


 Note puppet doesn't care what the file extension is, so long as the 
 template('path/to/file') refers to the correct file.
  

 and here is the complete copy of what is in the template:

 $outside = %= scope['dnsforwarders'] %
 $outside | out-file C:\output.log -append



 I've also tried the following:


 %= scope.lookupvar('@dnsforwarders') % | out-file C:\output.log -append


 Variables in the current scope can be accessed directly as %= 
 @dnsforwarders %, as opposed to the variable named @dnsforwarders
  

 %= scope.lookupvar('windows_dns::forwarders') % | out-file 
 C:\output.log -append


 I think the pipeline construct isn't doing what you would expect. I think 
 you need to quote the ERB snippet, so that powershell sees a literal string:

 '%= scope.lookupvar('windows_dns::forwarders') %' | out-file 
 C:\output.log -append
  

 %= scope.lookupvar('windows_dns::config') % | out-file C:\output.log 
 -append 


 Each time the output.log file is blank.  


 Here is my windows_dns::config file:

 class windows_dns::config {

 case $kernelmajversion {
 6.3: {
 $forwarder_execute = 
 'windows_dns/setdnsforwarders.ps1.erb'
 $forwarder_check = 'windows_dns/checkdnsforwarders.ps1'
 $dnsforwarders = $windows_dns::forwarders

 }
 6.1: {
 $forwarder_execute = 
 'windows_dns/setdnsforwarders_legacy.ps1'
 $forwarder_check = 'windows_dns/checkdnsforwarders_legacy.ps1'

 }
 }

 exec { 'forwarderscreate':

 command = template ($forwarder_execute),
 #unless = template ($forwarder_check),
 provider = powershell,
 logoutput = true,

 } 


 And here is where the variable is originally defined in the 
 windows_dns::init.pp

 class windows_dns(

 $forwarders = '1.1.1.1'

 ) {
anchor { 'windows_dns::begin': } -
class{'windows_dns::install': } -
class{'windows_dns::config': } -
class{'windows_dns::service': } -
anchor { 'windows_dns::end': }

 }


 If you are using a recent version of puppet, you don't need the anchor 
 pattern. See 
 https://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html
  


 Any help would be amazing to get the variable to pass


 Here's an example using an inline template that works correctly. Note I 
 have to escape the backslash c:\\output.log due to the double quoted 
 string. You won't need to do that if the template is in an external file:

 class windows_dns::config {
   $dnsforwarder = www.example.com

   exec { 'command':
 command   = inline_template('%= scope['dnsforwarder'] %' | 
 out-file c:\\output.log -append),
 logoutput = true,
 provider  = powershell
   }
 }

 include windows_dns::config

 C:\puppet apply powershell.pp
 Notice: Compiled catalog for win-agent in environment production in 0.11 
 seconds
 Notice: /Stage[main]/Windows_dns::Config/Exec[command]/returns: executed 
 successfully
 Notice: Finished catalog run in 1.09 seconds

 Note this will create a UTF-16LE encoded file with a byte-order mark. You 
 may want to specify the encoding of the file you're writing to.


 On Friday, October 10, 2014 5:28:06 PM UTC-4, Rob Reynolds wrote:



 On Thu, Oct 9, 2014 at 4:18 PM, Paul Ponzeka ponz...@gmail.com wrote:

 Thanks josh, so in my template file setdnsforwarders.ps1 is this the 
 correct syntax?


 setdnsforwarders.ps1.erb
  


 $outside = %= scope['dnsforwarders'] %
 $outside | out-file C:\output.log -append


 On Thursday, October 9, 2014 4:52:04 PM UTC-4, Josh Cooper wrote:



 On Thu, Oct 9, 2014 at 12:59 PM, Juan Andres Ramirez 
 jandr...@gmail.com wrote:

 Example:

 I have my script on powershell in the next path

 in Puppet:

 define some::module() {
$script = server1\\shared\\script.ps1
 
 exec { Executing a script:
   command = powershell.exe -ExecutionPolicy ByPass -File 
 ${script} ${param1},
   unless  = powershell.exe -ExecutionPolicy ByPass 
 -command \here any command on powershell \
 }



 On Thursday, October 9, 2014 4:22:14 PM UTC-3, Paul Ponzeka wrote:

 I am using Puppet installed with the powershell module.  I am 
 struggling with how to pass a puppet variable through to powershell.  
 For 
 instance I have the 

[Puppet Users] Re: One puppet run divided to two puppet runs

2014-10-15 Thread Marcin Spoczynski
Thanks for the answer, but the main question is why puppet need to have 2 
puppet runs instead of one in the 2 nd example?  

On Wednesday, 15 October 2014 14:11:48 UTC+1, jcbollinger wrote:

 I'm uncertain which differences between the two logs you find 
 significant.  They do appear to have been recorded at different log levels 
 -- that explains why one has Updated: entries and the other does not.  
 The various packages are managed in different order in the two runs, but 
 Puppet resource ordering is not guaranteed to be consistent (subject to 
 several caveats).  The two runs show somewhat different sets of resources 
 being updated, but even if the nodes receive identical catalogs, which 
 resources are updated will vary depending on which resources need to be 
 updated.

 Anyway, you cannot parallelize catalog runs.  The agent employs a lock 
 file to ensure that you do not do so.  This is because multiple concurrent 
 runs can conflict with each other.  Even if Puppet wanted to parallelize 
 internally -- and in principle it could do so to some extent -- it is far 
 trickier than just arbitrarily splitting resources among threads.  
 Moreover, the gain achievable that way is unclear, but likely to be 
 variable and small, as most of the time-consuming operations the agent 
 performs are I/O bound.


-- 
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify the system manager. 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4902b058-3ae9-4b55-94c6-aa01642486ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: pkgutil package provider (solaris)

2014-10-15 Thread Wil Cooley
On Oct 15, 2014 3:55 AM, Frederic Conrotte frederic.conro...@gmail.com
wrote:

 Hello

 Like many enterprises, we have an heterogeneous infrastructure with some
CentOS and Solaris machines.

 I was wondering if lookthere are existing plans about creating for
Solaris the equivalent of the yumrepo type ?

Unless this has changed in versions later than what I'm using, pkgutil only
supports a single repository, so it's really just a matter of configuring
pkgutil.conf. 'yumrepo' is useful because there can be any number of repos
defined.

Wil

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


[Puppet Users] Puppet Master Disk usage management

2014-10-15 Thread Mark Rosedale
Hello,

I'm running puppet  with puppetdb and puppet-dashboard all on my master.

I want to make sure that I don't get overrun with disk usage by either the 
master (storing reports) or the dbs for puppetdb (I'm running postgres) or 
puppet-dashboard (mysql). 

I'm wondering what some people do to manage disk usage for each of these? 

Thanks,
mjr 
 

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


[Puppet Users] Re: LoadError: no such file to load -- facter/util/file_read

2014-10-15 Thread Craig White
OK - so am I at the moment anyway...

# puppet -V
3.6.2 (Puppet Enterprise 3.3.2)

I was rather frustrated by not having a system ruby so I did the 
following...
# ln -s /opt/puppet/bin/ruby /opt/puppet/bin/irb /opt/puppet/bin/gem 
/usr/local/bin

which made ruby/gem/irb available to any user any where. Before you do that 
though, make sure you don't have another ruby installed - 'which ruby' will 
tell you if it finds a ruby anywhere on your $PATH

You should be able to do this - if you can't, there's something wrong with 
your install of puppet/ruby/etc.

# irb
irb(main):001:0 require 'facter'
= true
irb(main):002:0

On Wednesday, October 15, 2014 6:50:41 AM UTC-7, Spriya wrote:

 Hi Craig,

 I am using PE. My installation was all in one(master,database,console). 
 Yes  i have more than one ruby installed.

 *ruby -v*
 *ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]*


 *$ cd /opt/puppet/bin*
 *./ruby -v*
 *ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]*


 let me know how to troubleshoot this issue.


 On Tuesday, October 14, 2014 7:54:04 PM UTC-4, Craig White wrote:

 how did you install puppet?  Do you have more than one install of ruby on 
 your system?  Is it possible that when you invoke the interactive ruby 
 console (irb) that it starts a ruby binary that has nothing to do with your 
 puppet install?

 On Tuesday, October 14, 2014 4:41:07 PM UTC-7, Spriya wrote:

 Hi Craig,

 even if i do  require facter. It is throwing me error.

 *irb(main):002:0 require 'facter'*
 *LoadError: no such file to load -- facter*
 *from (irb):2:in `require'*
 *from (irb):2*
 *from :0*


 On Tuesday, October 14, 2014 5:22:26 PM UTC-4, Craig White wrote:

 I don't see a 'file_read' method for Factor::Util

 Facter::Util.methods
 = [:freeze, :===, :==, :=, :, :=, :, :=, :to_s, 
 :included_modules, :include?, :name, :ancestors, :instance_methods, 
 :public_instance_methods, :protected_instance_methods, 
 :private_instance_methods, :constants, :const_get, :const_set, 
 :const_defined?, :const_missing, :class_variables, :remove_class_variable, 
 :class_variable_get, :class_variable_set, :class_variable_defined?, 
 :public_constant, :private_constant, :module_exec, :class_exec, 
 :module_eval, :class_eval, :method_defined?, :public_method_defined?, 
 :private_method_defined?, :protected_method_defined?, 
 :public_class_method, 
 :private_class_method, :autoload, :autoload?, :instance_method, 
 :public_instance_method, :psych_yaml_as, :yaml_as, :psych_to_yaml, 
 :to_yaml_properties, :to_yaml, :nil?, :=~, :!~, :eql?, :hash, :class, 
 :singleton_class, :clone, :dup, :initialize_dup, :initialize_clone, 
 :taint, 
 :tainted?, :untaint, :untrust, :untrusted?, :trust, :frozen?, :inspect, 
 :methods, :singleton_methods, :protected_methods, :private_methods, 
 :public_methods, :instance_variables, :instance_variable_get, 
 :instance_variable_set, :instance_variable_defined?, :instance_of?, 
 :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, 
 :respond_to_missing?, :extend, :display, :method, :public_method, 
 :define_singleton_method, :object_id, :to_enum, :enum_for, :psych_y, 
 :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__]

 Craig

 On Tuesday, October 14, 2014 2:01:15 PM UTC-7, Spriya wrote:

 Hi,

 I am am trying to execute my puppet facts using irb. so when i use 
 irb. It is throwing me error. No such file to load -- 
 facter/util/file_read

 *$irb*
 *irb(main):001:0 require 'facter/util/file_read'*
 *LoadError: no such file to load -- facter/util/file_read*
 *from (irb):1:in `require'*
 *from (irb):1*
 *from :0*
 *irb(main):002:0 require 'facter'*
 *LoadError: no such file to load -- facter*
 *from (irb):2:in `require'*
 *from (irb):2*
 *from :0*

 Anyone help me



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


[Puppet Users] Using r10k to deploy production. How to setup a local dev environment for modules?

2014-10-15 Thread JeremyCampbell
Hi,

We're using r10k with a 'control' repo to deploy to our production server 
following Gary Larizza's excellent series 
http://garylarizza.com/blog/2014/03/07/puppet-workflow-part-3b/ workflow 
with r10k. Our current workflow requires engineers to commit changes to the 
repo on a feature branch which is then deployed to a test environment using 
r10k. They are unable to test changes locally before making a commit as 
they don't have a local development puppetmaster. We'd like to implement a 
local dev environment using VM's and vagrant. 

Our aim is to allow a developer to spin up a local development environment 
that has a puppetmaster VM and multiple puppet clients for testing. The 
developer should be able to test changes locally before committing changes 
for the live test environment. To spin up the environment we expect to 
build a puppetmaster VM that will be deployed as a vagrant box. This box 
will be more or less a generic puppetmaster without any of our manifests 
installed. The developer would then run some scripts to clone the 'control' 
repo and checkout the repo's in the Puppetfile. We can't use r10k to 
checkout the modules in the Puppetfile as we need each individual module 
cloned so developers can work on each module. Is the only solution to 
manually clone each module in the Puppetfile?

Any advice on how local development environments are being used with r10k 
in production would be much appreciated!

Jeremy.

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


[Puppet Users] PuppetDB curl and puppetdbquery tentative to filter nodes on an array type parameter including a value

2014-10-15 Thread Baptiste Grenier
Hello puppeters,

I have check_mk::host resource exported by my nodes, and this resources
contain a host_tags parameter that is an array.

I am trying to query PuppetDB to filer my nodes to retrieve all the nodes
exporting this Check_mk::Host resources containing a specific value (nat) in the
host_tags array.

My ultime goal is to be able to write something like this in my manifests, to
retrieve all the check_mk hosts that are behind NAT:

--8--
$nat_nodes = query_nodes('@@Check_mk::Host{host_tags = nat}')
--8--

With the = meaning that the nat tag is included in the host_tags array. (I
would love to have a construction like the in operator of the puppet language 
[1]...)

So I started playing with the puppet query module [2], the following works:
--8--
puppet query nodes @@Check_mk::Host['node1.domain.tld']
--8--

But not the following:
--8--
puppet query nodes '@@Check_mk::Host{host_tags = nat}'
--8--

So I started looking at the raw PuppetDB API using curl to see if I was able to
find the correct syntaxe.

I was able to filter the nodes on the complete host_tags parameter value:
--8--
 curl --cacert /var/lib/puppet/ssl/certs/ca.pem \
  --cert /var/lib/puppet/ssl/certs/puppet.domain.tld.pem \
  --key /var/lib/puppet/ssl/private_keys/puppet.domain.tld.pem \
  'https://puppet.domain.tld:8081/v4/resources' \
  -X GET \
  --data-urlencode 'query=[and,
[and,
[=, type, Check_mk::Host],
[=, exported, true]],
[=, [parameter, host_tags ], [ wan, nat, RedHat ]]]'
--8--

The output is something like this:

--8--
[ {
  tags : [ profile::check_mk, check_mk::host, baseclass, agent,
  host, class, profile, check_mk::agent, node1.domain.tld,
  check_mk, node ],
  file : 
/etc/puppet/environments/production/modules/check_mk/manifests/agent.pp,
  type : Check_mk::Host,
  title : node1.domain.tld,
  line : 28,
  resource : 0405e0d6caa542a1fc1f348f42524f1f9f9e4875c,
  environment : production,
  certname : node1.domain.tld,
  parameters : {
host_tags : [ wan, nat, RedHat ]
  },
  exported : true
},
(...)
]
--8--

Then I saw in the v4 API documentation [3] that the equality operator on arrays
should math if any one of their elements match, so I tried something like this:

--8--
 curl --cacert /var/lib/puppet/ssl/certs/ca.pem \
  --cert /var/lib/puppet/ssl/certs/puppet.domain.tld.pem \
  --key /var/lib/puppet/ssl/private_keys/puppet.domain.tld.pem \
  'https://puppet.domain.tld:8081/v4/resources' \
  -X GET \
  --data-urlencode 'query=[and,
[and,
[=, type, Check_mk::Host],
[=, exported, true]],
[=, [parameter, host_tags ], nat]]'
--8--

But it does not return me anything, the previously matched nodes are not
returned, is such a filtering possible?

Was someone able to do something like this?

If someone have any idea on how to proceed with this... Thanks in advance!

Refs:
[1]- https://docs.puppetlabs.com/puppet/3.7/reference/lang_expressions.html#in
[2]- https://github.com/dalen/puppet-puppetdbquery
[3]- 
https://docs.puppetlabs.com/puppetdb/2.2/api/query/v4/operators.html#equality

Best,
Baptiste

-- 
\,,/_[-_-]_\,,/

What has not been examined impartially has not been well
 examined. Skepticism is therefore the first step toward truth.
   [Denis Diderot, Pensees philosophiques]

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


Re: [Puppet Users] Puppet Master Disk usage management

2014-10-15 Thread Dhaval Thakar
Hi,

I run following commands to clean reports from mysql  filesystem.

I am still learning puppet, try this on your test setup. For my requirement 
dashboard reports for three days is enough.

cd /usr/share/puppet-dashboard ; export RAILS_ENV=production ; rake 
reports:prune upto=3 unit=day
cd /usr/share/puppet-dashboard ; export RAILS_ENV=production ; rake 
reports:prune:orphaned
find /var/lib/puppet/reports/ -mmin +300 -type f -print0 | xargs -0 -r rm  
/dev/null 21

On 15 October 2014 9:41:36 pm IST, Mark Rosedale mrosed...@vivox.com wrote:
Hello,

I'm running puppet  with puppetdb and puppet-dashboard all on my
master.

I want to make sure that I don't get overrun with disk usage by either
the 
master (storing reports) or the dbs for puppetdb (I'm running postgres)
or 
puppet-dashboard (mysql). 

I'm wondering what some people do to manage disk usage for each of
these? 

Thanks,
mjr 
 

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

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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


[Puppet Users] Sid and Unstable have been removed from apt.puppetlabs.com

2014-10-15 Thread Melissa Stone
As previously announced[1], Sid and Unstable have now been removed from
apt.puppetlabs.com

[1] - https://groups.google.com/d/msg/puppet-users/qGokHDBC38Q/UmFVKRFA6XYJ

-- 
Melissa Stone
Release Engineer, Puppet Labs

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


Re: [Puppet Users] Puppet Master Disk usage management

2014-10-15 Thread Mark Rosedale
That is good information, though I find that the prune command for 
puppet-dashboard doesn't really seem to have a major impact on disk usage. 

I did find this as yet another directory where reports are stored 
/usr/share/puppet-dashboard/spool

Looks like that may need the same attention /var/lib/puppet/reports needs. 

On Wednesday, October 15, 2014 1:07:49 PM UTC-4, Dhaval Thakar wrote:

 Hi,

 I run following commands to clean reports from mysql  filesystem.

 I am still learning puppet, try this on your test setup. For my 
 requirement dashboard reports for three days is enough.

 cd /usr/share/puppet-dashboard ; export RAILS_ENV=production ; rake 
 reports:prune upto=3 unit=day
 cd /usr/share/puppet-dashboard ; export RAILS_ENV=production ; rake 
 reports:prune:orphaned
 find /var/lib/puppet/reports/ -mmin +300 -type f -print0 | xargs -0 -r rm 
  /dev/null 21

 On 15 October 2014 9:41:36 pm IST, Mark Rosedale mros...@vivox.com 
 javascript: wrote:

 Hello,

 I'm running puppet  with puppetdb and puppet-dashboard all on my master.

 I want to make sure that I don't get overrun with disk usage by either 
 the master (storing reports) or the dbs for puppetdb (I'm running postgres) 
 or puppet-dashboard (mysql). 

 I'm wondering what some people do to manage disk usage for each of these? 

 Thanks,
 mjr 
  

  
 -- 
 Sent from my Android device with K-9 Mail. Please excuse my brevity.


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


[Puppet Users] Using gem from new puppetserver custom function?

2014-10-15 Thread Schofield
I am testing out the new puppetserver 
https://github.com/puppetlabs/puppet-server/blob/master/documentation/install_from_packages.markdownand
 
finding a problem with referencing a gem installed to the local ruby.  

A custom function is installed to 
/usr/lib/ruby/site_ruby/1.8/pupppet/parser/functions/myfunction.rb.  It 
makes use of the mysql2 gem

module Puppet::Parser::Functions
  newfunction(:myfunction, :type = :rvalue) do |args|
require 'mysql2'
...
end

The mysql2 gem is installed to 
/usr/lib/ruby/gems/1.8/gems/mysql2-0.3.16/lib/mysql2.rb.

When doing a puppet run on a managed node we get the following error.

Error: Could not retrieve catalog from remote server: Error 400 on 
SERVER: no such file to load -- mysql2

My question is: How make a gem visible to the new puppetserver so it can be 
used by a custom function?

I should note this set up works fine when running puppetmaster 3.7 instead 
of the new puppetserver.

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


Re: [Puppet Users] Using gem from new puppetserver custom function?

2014-10-15 Thread Kylo Ginsberg
On Wed, Oct 15, 2014 at 11:50 AM, Schofield dbschofi...@gmail.com wrote:

 I am testing out the new puppetserver
 https://github.com/puppetlabs/puppet-server/blob/master/documentation/install_from_packages.markdownand
 finding a problem with referencing a gem installed to the local ruby.

 A custom function is installed to
 /usr/lib/ruby/site_ruby/1.8/pupppet/parser/functions/myfunction.rb.  It
 makes use of the mysql2 gem

 module Puppet::Parser::Functions
   newfunction(:myfunction, :type = :rvalue) do |args|
 require 'mysql2'
 ...
 end

 The mysql2 gem is installed to
 /usr/lib/ruby/gems/1.8/gems/mysql2-0.3.16/lib/mysql2.rb.

 When doing a puppet run on a managed node we get the following error.

 Error: Could not retrieve catalog from remote server: Error 400 on
 SERVER: no such file to load -- mysql2

 My question is: How make a gem visible to the new puppetserver so it can
 be used by a custom function?


Have you done the steps described here:
https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown

Best,
Kylo
-- 
Kylo Ginsberg | k...@puppetlabs.com | irc: kylo | twitter: @kylog

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


Re: [Puppet Users] Puppet Master Disk usage management

2014-10-15 Thread Ramin K

On 10/15/14 9:11 AM, Mark Rosedale wrote:

Hello,

I'm running puppet  with puppetdb and puppet-dashboard all on my master.

I want to make sure that I don't get overrun with disk usage by either
the master (storing reports) or the dbs for puppetdb (I'm running
postgres) or puppet-dashboard (mysql).

I'm wondering what some people do to manage disk usage for each of these?


In regards to Puppet Dashboard, the Mysql based one, I wrote this up 
over a year ago

https://ask.puppetlabs.com/question/884/how-do-i-reduce-the-space-mysql-is-using-for-puppet-dashboard/

Remember just doing the prunes will not reclaim space. You must optimize 
the table in order to shrink it. And running the optimize will not 
reclaim space unless the table resides in its own file.


Ramin

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


[Puppet Users] Client-side tech stack

2014-10-15 Thread Kylo Ginsberg
[I am forking from the thread announcing Puppet Server 0.2.0, for which
this was OT.]

Sorry for the delayed response on this - hard to keep up with email at
times :)

On Fri, Oct 10, 2014 at 4:55 PM, Felix Frank 
felix.fr...@alumni.tu-berlin.de wrote:

 On 10/03/2014 03:50 PM, jcbollinger wrote:


 I feel compelled to point out that if the faster language happens to be
 C++, then you will *need* a plug-in interface in some different language
 (presumably Ruby, but straight C would be more typical).  C++ APIs are
 sensitive to compiler and compile options used, and they provide
 essentially no compile-time encapsulation of API classes' private members,
 so it would not be wise to suppose that you will ever be able to directly
 support unwrapped, third-party, C++ plugins.  Especially with the current
 fast pace of Puppet development.

 Absolutely correct. C++11 is an *implementation* choice, but not an
*interface* choice, for the reasons you've given.

For cfacter (at least initially) the tldr on plugin support is two-fold:
* for custom facts, we dynamically load the ruby library (if not already
loaded) and implement the facter API used by custom facts
* implement external facts

The non-tldr version is at
https://github.com/puppetlabs/cfacter/blob/master/Extensibility.md and also
discusses some future ideas for getting external facts on a par with custom
facts (e.g. providing built-in facts as a json blob on stdin).

We definitely could implement a C interface for adding facts as well. There
were one or two questions about that at PuppetConf. I'd be curious to know
how much demand there is for that approach.

Thinking about the extension points for the agent, notably providers, we
may be able to follow a similar-ish model there of:
* dynamically load ruby and implement the provider api (tricky b/c the api
needs improved definition/hardening)
* introduce a concept of external providers
* maybe add a C API here as well?

Feedback or ideas in this space would be great!



 I somehow just realized yesterday that CFacter is a thing already. So I
 guess we're already somewhere down this road.

 Just cloned the repo - doesn't seem to build on Debian sid with Ruby
 2.1.0. Will likely take some fiddling.


Of the debians, I haven't tried sid, though we are building it on wheezy
(packages coming in the next week or two, so stay tuned).

FYI the build doesn't depend on ruby-devel packages (the MRI embedding
relies on the relevant bits of the Ruby C API being stable, which it
generally has been).

If you have build issues on sid (or anywhere for that matter), just ping on
irc/email/etc; I'm sure people can sort it out. And these are early days
for this tech stack, so it would be nice to surface oddities or friction
points early.

Best,
Kylo

-- 
Kylo Ginsberg | k...@puppetlabs.com | irc: kylo | twitter: @kylog

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


[Puppet Users] Re: how to transfer list of interfaces from hiera to class

2014-10-15 Thread Corey Osman
Your other option if using the future parser is to use the each function 
and iterate around the hash like you would in any other language.

$interfaces = hiera('network_interfaces')

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


$interfaces.each { |$interface|
  managed_interface { $interface['device']:
device  = $interface['name'],
ipaddr  = $interface['ipaddr'],
netmask = $interface['netmask'], 
  }
}


Corey

On Tuesday, October 14, 2014 2:29:35 AM UTC-7, Andreas Dvorak wrote:

 Hi,

 I would like to create network interfaces with puppet.
 I have
 define network_interface::managed_interface(
   $device='',
   $gateway='',
   $hostname='',
   $hwaddr='',
   $ipaddr='',
   $netmask='',
   $network='',
   $up=true,
 ){

 and
 class network_interface::create_interface (
   $device = hiera()',
 ){
   managed_interface { $device:
 device  = $device,
 ipaddr  = $ipaddr,
 netmask = $netmask, 
   }
 }

 and hiera yaml file:
 network_interface:
   eth0:
 ipaddr: 10.112.67.40
 netmask: 255.255.0.0
   eth1:
 ipaddr: 10.15.67.40
 netmask: 255.255.0.0

 Now I don't know how to read the hiera values in the class 
 network_interface::create_interface. The interface names can be different.
 Can some please help me?

 Best regards
 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/20d0e3e3-3b97-4276-a231-b2f1ce30a2b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Custom Providers and Third Party Gems

2014-10-15 Thread Corey Osman
Just to add.

If you can remove any gem dependency by reimplementing that functionality 
inside your own provider or even create some helper code I would try that. 
 There is a section in Nan's book that details how to distribute external 
helper code inside the module for native types/providers.   Its some 
special folder called PUPPET_X or something (can't remember).  If your 
using open source puppet you could even augment the puppet gemspec to 
include new runtime dependencies.  However, you would also need to host 
this custom gem and ensure everyone downloads your custom gem instead of 
the puppet gem from puppet labs/rubygems.org.

I would also consider using omnibus and creating your own distributable 
packages that contain everything you need to run your puppet environment. 
 This way as long as your system has been bootstrapped with your 
management package you can ensure everything is there to run your custom 
native type/providers.  This would also make it easy to version your 
cocktail of management gems and packages.


Corey
On Thursday, October 2, 2014 10:54:06 AM UTC-7, Chris Pitman wrote:

 Hey everyone,

 I'm hoping someone can enlighten me here: Why is it so hard/complicated to 
 use third party gems when developing a custom provider? It seems to me that 
 pulling in gems should be priority #1, since it allows providers to 
 leverage a lot of development already done in the ruby community.

 However, right now it is complicated:

 1. I have to get my users downstream to install gem dependencies before 
 using any resources related to the provider. There is no way for me to 
 annotate the module itself for these dependencies, and no support for 
 automatically pulling them down.

 2. Features offer very limited capability (as far as I understand), and 
 are poorly documented. The only documentation is on how to link providers 
 and types using features, not on how to require ruby libraries. There is no 
 way for anything other than a type to specify requiring a feature. For 
 example, what if a provider requires a gem?

 3. Features only protect part of the lifecycle. Even without a feature 
 present, puppet still attempts to resolve auto-require relationships. This 
 makes sense based on how things work, but what am I supposed to do if I 
 need a third party gem there?

 4. Some gem dependencies need to be present on both the puppet master (in 
 the master's environment) and on the node. There is no way for me to 
 transparently take care of this for users.

 So, am I just missing something? Is there some secret hook in the puppet 
 source that makes dealing with gems better? Should I just start 
 distributing this provider as a package, and ignore puppet module, r10k, 
 etc? Or are there any changes coming down the pipeline that will make this 
 work better?

 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/9f2afba5-025c-4bee-ac67-8559de417dd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet facts uploading to PuppetDB

2014-10-15 Thread Corey Osman
I am using this in a puppet post run command to upload the facts that 
changed after the puppet run.

I have run into this problem on many occasions where I like to build a 
custom UI around displaying custom facts.

Because facts only get uploaded to puppetdb before the puppet agent runs so 
there has always been a delay of one puppet run in realizing what the 
environment actually looks like.

So to fix this we used the puppet facts upload functionality.  There are 
many custom facts that interact with the software that puppet was deploying.

So in a way we are using facts outside of puppet but we are using 
puppetdb's REST API to retrieve those facts and display to our developers.

Basically we use facts as infrastructure metadata that we can display to 
our developers and devops team to make informed decisions about what's 
deployed where 
and who broke the environment by showing latest git revisions of the 
deployed code.  

If you would like to talk further about this please reach out to me via 
email.


Corey
 
 
On Thursday, October 2, 2014 1:55:11 AM UTC-7, Ken Barber wrote:

  We do this, but could probably live without it. But we do it using the 
 facts 
  indirector and setting it up to cache to puppetdb. 

 So in both cases you use 'puppet facts upload'? 

 ken. 


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


Re: [Puppet Users] Using gem from new puppetserver custom function?

2014-10-15 Thread Schofield
Thanks for the reply.  That does indeed look to be the solution.  

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/31187a9b-47ff-4ebf-80d1-d47eaebec887%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Using gem from new puppetserver custom function?

2014-10-15 Thread Corey Osman
Piggybacking off the same topic.


I have a few parsers that use the JSON gem so require 'json' is at the top 
of my parser which requires the native C extensions.  Does the new puppet 
server come with a jrbuy version of the json gem that contains the 
functions?  How would I write a parser that can be used on the ruby puppet 
master and the new jruby puppet server if the gems are slightly different 
and have different method names?  

On Wednesday, October 15, 2014 2:40:45 PM UTC-7, Schofield wrote:

 Thanks for the reply.  That does indeed look to be the solution.  


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


[Puppet Users] split PE install console node not reporting

2014-10-15 Thread Difladermaus
New split node install and end of install displayed this issue. Same 
meesage when try to run puppet agent --test

[root@pmc-bashir pe-mcollective]# puppet agent --test Warning: Unable to 
fetch my node definition, but the agent run will continue: Warning: SSL* 
connect 
returned=1 errno=0 state=SSLv3 read server certificate B: certificate 
verify failed: [self signed certificate in certificate chain for /CN=Puppet 
CA generated on pm-greyson.something.com 
http://pm-greyson.something.com/ at 2014-10-14 15:02:09 -0400] Info: 
Retrieving plugin Error: /File[/var/opt/lib/pe-puppet/lib]: Failed to 
generate additional resources using 'eval *generate': SSL* connect 
returned=1 errno=0 state=SSLv3 read server certificate B: certificate 
verify failed: [self signed certificate in certificate chain for /CN=Puppet 
CA generated on pm-greyson.something.com 
http://pm-greyson.something.com/ at 2014-10-14 15:02:09 -0400] Error: 
/File[/var/opt/lib/pe-puppet/lib]: Could not evaluate: Could not retrieve 
file metadata for puppet://pm-greyson.something.com/plugins: SSL *connect 
returned=1 errno=0 state=SSLv3 read server certificate B: certificate 
verify failed: [self signed certificate in certificate chain for /CN=Puppet 
CA generated on pm-greyson.something.com at 2014-10-14 15:02:09 -0400] 
Wrapped exception: SSL *connect returned=1 errno=0 state=SSLv3 read server 
certificate B: certificate verify failed: [self signed certificate in 
certificate chain for /CN=Puppet CA generated on pm-greyson.something.com 
http://pm-greyson.something.com/ at 2014-10-14 15:02:09 -0400] Info: 
Loading facts in /etc/puppetlabs/puppet/modules/stdlib/lib/facter/puppet 
*vardir.rb 
Info: Loading facts in 
/etc/puppetlabs/puppet/modules/stdlib/lib/facter/pe*version.rb 
Info: Loading facts in 
/etc/puppetlabs/puppet/modules/stdlib/lib/facter/root*home.rb Info: Loading 
facts in /etc/puppetlabs/puppet/modules/stdlib/lib/facter/facter*dot*d.rb 
Info: Loading facts in /opt/puppet/share/puppet/modules/auth
*conf/lib/facter/custom*auth*conf.rb Info: Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet*vardir.rb Info: 
Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/pe*version.rb 
Info: Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/root*home.rb Info: 
Loading facts in /opt/puppet/share/puppet/modules/stdlib/lib/facter/facter
*dot*d.rb Info: Loading facts in 
/opt/puppet/share/puppet/modules/concat/lib/facter/concat*basedir.rb Info: 
Loading facts in /opt/puppet/share/puppet/modules/pe*
staging/lib/facter/staging*http*get.rb Info: Loading facts in 
/opt/puppet/share/puppet/modules/pe*postgresql/lib/facter/pe*postgres
*default*version.rb Info: Loading facts in 
/opt/puppet/share/puppet/modules/pe*puppetdb/lib/facter/pe*puppetdb*server*status.rb
 
Info: Loading facts in 
/opt/puppet/share/puppet/modules/postgresql/lib/facter/postgres*default*version.rb
 
Info: Loading facts in /opt/puppet/share/puppet/modules/puppet
*enterprise/lib/facter/pe*build.rb Info: Loading facts in 
/opt/puppet/share/puppet/modules/puppet*enterprise/lib/facter/windows.rb 
Info: Loading facts in /opt/puppet/share/puppet/modules/puppet*
enterprise/lib/facter/platform*tag.rb Info: Loading facts in 
/opt/puppet/share/puppet/modules/firewall/lib/facter/iptables*persistent*version.rb
 
Info: Loading facts in 
/opt/puppet/share/puppet/modules/firewall/lib/facter/iptables*version.rb 
Info: Loading facts in 
/opt/puppet/share/puppet/modules/firewall/lib/facter/ip6tables*version.rb 
Info: Loading facts in 
/var/opt/lib/pe-puppet/lib/facter/iptables*persistent*version.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables*version.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/sudoversion.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom*auth*conf.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe*build.rb Info: 
Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet*vardir.rb Info: 
Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe*version.rb Info: 
Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres*default*version.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb Info: 
Loading facts in /var/opt/lib/pe-puppet/lib/facter/root*home.rb Info: 
Loading facts in /var/opt/lib/pe-puppet/lib/facter/staging*http*get.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/platform*tag.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables*version.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter*dot*d.rb 
Info: Loading facts in 
/var/opt/lib/pe-puppet/lib/facter/pe*postgres*default*version.rb 
Info: Loading facts in 
/var/opt/lib/pe-puppet/lib/facter/pe*puppetdb*server*status.rb 
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat*basedir.rb 
Error: Could not retrieve catalog from remote server: SSL* connect 
returned=1 errno=0 state=SSLv3 read server certificate B: certificate 

[Puppet Users] SSL POODLE Vulnerability

2014-10-15 Thread Mike Seda
Puppet Developers,
Based on the SSL POODLE vulnerability (
https://www.openssl.org/~bodo/ssl-poodle.pdf ), will you be patching
WEBrick to deny SSLv3 like you did with SSLv2 (
https://projects.puppetlabs.com/issues/19151 )?

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/543EF513.3090300%40lillegroup.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] how install foreman in suse 11 sp2

2014-10-15 Thread tony jia
My work environment is completely using SUSE 11 SP2 opereating system,now i 
received a request to use the foreman. but http://software.opensuse.org/; 
only has home repos. how install foreman better ?

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


[Puppet Users] Re: Could not set 'file on ensure: undefined method `' for 760

2014-10-15 Thread Torsten Amshove
Hi,

I just saw there is an update to 2.7.x IN SLES 11 SP3 now - there it is 
fixed.

Regards
  Torsten

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