[Puppet Users] Re: [pe-users] error regarding dependencies

2012-10-15 Thread Stuart Cracraft
I was able to get around this with a puppet deinstall/reinstall with 
purge/delete and a mysql deinstall/reinstall 
with a rename of the /var/lib/mysql directory. I can only guess that the 
modes/permissions were to blame
but I didn't have time to dig into it.

On Oct 14, 2012, at 2:49 PM, Stuart Cracraft smcracr...@me.com wrote:

 I am getting a truckload of errors:
 
  notice: /File[/var/opt/lib/pe-puppet/lib/puppet/provider/file_line]: 
 Dependency File[/var/opt/lib/pe-pupet/lib] has failures: true
  warning: /File[/var/opt/lib/pe-puppet/lib/puppet/provider/file_line]: 
 Skipping because of failed dependencies
 
 Has anyone seen the above errors at their site?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Enterprise Users group.
 To unsubscribe from this group, send email to 
 pe-users+unsubscr...@puppetlabs.com.
 Visit this group at 
 http://groups.google.com/a/puppetlabs.com/group/pe-users/?hl=en-US.
 
 

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



[Puppet Users] runs

2012-10-15 Thread Stuart Cracraft
Seems to me that the default puppet enterprise 2.6.1 setup often fails to run 
its assigned classes at the
level set in runinterval in puppet.conf in the master/agent sections (mine has 
runinterval = 180 in both.)

When running manually puppet agent -t, all is just fine, but the out-of-the-box 
2.6.1 doesn't
do that by default as far as I can tell. Any reason why not?

I'd expect the runinterval in puppet.conf to be definitive, causing a run. 

--Stuart

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



Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Stefan Schulte
On Sun, Oct 14, 2012 at 04:20:09PM +0200, Jakov Sosic wrote:
 On 10/14/2012 03:01 PM, Stefan Schulte wrote:
  If you use ensurable, puppet will expect the provider to have an
  exists? method and if that returns true your create method will not be
  called so you do not have to check the existance in the create method
  again.
 
 But then I would have to change all params to properties and add 
 appropriate methods to provider, but that would both slow it down and 
 complicate it more... I don't know if it's worth it just for the sake of 
 log message stating property changed from A to B instead of 
 cobblersystem created on every param change.
 

Is it possible to run a command to get all the desired information about
every systems at once? This way you can implement a prefetch pattern.
Basically you create provider instances for each system at once and
write the current values in the @property_hash hash. Then your get methods
just return the cached value which scales pretty well.
 
  If adding interfaces to a new host is exactly the same as changing
  interfaces of an already existing host you can call
 
   interface = resource[:interface] if resoure[:interface]
 
 I'll try that.
 
 
  Is your provider dealing with files or does it execute commands? When
  dealing with files I find it is often easier to do all the work in the
  flush method (which is only called if it is implemented by the provider)
  and the other set methods are only updating the @property_hash hash.
 
  So if you want to share your provider code I am always interested ;-)
 
 Offcourse, I have nothing to hide. Here's the current code:
 
 http://pastebin.com/f7GFU2qp
 
 
 
 -- 
 Jakov Sosic
 www.srce.unizg.hr
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

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



Re: [Puppet Users] Error while installing puppet

2012-10-15 Thread mastinder singh
Hi Jeff,


I don't have ruby by default in my system.I also don't don't have internet
on machine where i try to install puppet.I can only scp packages in it.

Thanks,
Mastinder Singh



On Fri, Oct 12, 2012 at 8:12 PM, Jeff McCune j...@puppetlabs.com wrote:

  Why are you building your own ruby instead of using one of the packages
 available already for your operating system?

 You shouldn't need to compile ruby in order to use Puppet.

 -Jeff

 On Oct 12, 2012, at 4:57 AM, mastinder singh mastin...@gmail.com wrote:

  Hi Jeff,

 I have run this command in ruby  .But is still got error.

 ruby extconf.rb  --with-openssl-include=/usr/local/ssl/include
  --with-openssl-lib=/usr/local/ssl/ LD_RUN_PATH=/usr/local/ssl/lib  make
  make install

 On Thu, Oct 11, 2012 at 9:58 PM, Jeff McCune j...@puppetlabs.com wrote:

 Did you build your own Ruby and forget to compile the openssl ruby
 bindings into MRI?  I've certainly done this and forgot to compile against
 OpenSSL which caused this error.

 If you're building your own ruby, I strongly recommend using a build tool
 like rbenv [1] and ruby-build [2] to get a consistent build.

 Also, I strongly encourage you _not_ to use install.rb.  These days,
 install.rb is really meant for package maintainers instead of end users.
  I'd recommend using a package from {apt,yum,downloads}.puppetlabs.com,
 your distribution, or rubygems.org.

 [1] https://github.com/sstephenson/rbenv
 [2] https://github.com/sstephenson/ruby-build

 -Jeff

  On Thu, Oct 11, 2012 at 8:28 AM, mastinder singh mastin...@gmail.comwrote:

  I am getting below error.

   ruby install.rb
 Could not load openssl; cannot install
 [root@BL08DL365 puppet-3.0.0]#


 --
 regards,

 Mastinder singh
 Uk Number +447624169401
 India +918105601518
 USA 1-855-946-2329 / (205) 588-4757
 Israel *057 - 9463862
 Website: http://mastinder.in
 *

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


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




 --
 regards,

 Mastinder singh
 Uk Number +447624169401
 India +918105601518
 USA 1-855-946-2329 / (205) 588-4757
 Israel *057 - 9463862
 Website: http://mastinder.in
 *

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

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




-- 
regards,

Mastinder singh
Uk Number +447624169401
India +918105601518
USA 1-855-946-2329 / (205) 588-4757
Israel *057 - 9463862
Website: http://mastinder.in
*

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread R.I.Pienaar


On 15 Oct 2012, at 01:26, Nigel Kersten ni...@puppetlabs.com wrote:

 On Saturday, October 13, 2012 8:23:57 AM UTC-7, Paul Belanger wrote:
 On Friday, October 12, 2012 10:10:54 AM UTC-4, windowsrefund wrote:
 
 Recently, there have been some changes made to the Puppetlabs website which 
 result in the free software releases being difficult to locate and download.
 
 Visitors using the download links are taken directly to the non-free 
 Enterprise option rather than being presented with an option.
 
 Personally, I'd like to see the site reverted so users have the option.
 
 FYI, the wiki section still provides this useful content here:
 
 http://projects.puppetlabs.com/projects/1/wiki/downloading_puppet
 
 Best,
 Adam Kosmin
 
 I was asking this on IRC the other day.  I understand the need to collect 
 information for prospective customers, however requiring a pay wall 
 (personal information) to access the open source tarballs does not seem to 
 be in the spirit of free software[1].
 
 There are lots of ways people get open source Puppet, and not many people 
 actually grab them in tarball form from the website from the stats we have.
 
 Apart from being in the distributions, most of you seem to be getting 
 software from the apt/yum repos, which don't require a paywall:
 
 http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html
 
 If you're hitting the main page, yes, the Download link goes to PE by 
 default, with a link to the OSS download page at the bottom.


The survey/user info page you get for the open source version used to have a 
bypass and go str8 to the downloads link, doesn't have it anymore. 

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



[Puppet Users] base64 within module

2012-10-15 Thread Luca Gioppo
I have to convert a string in base64 before placing it inside a template 
with puppet.
Is there a function available and how?
Thanks
Luca

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



Re: [Puppet Users] base64 within module

2012-10-15 Thread R.I.Pienaar


- Original Message -
 From: Luca Gioppo lucagio...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Monday, October 15, 2012 8:51:43 AM
 Subject: [Puppet Users] base64 within module
 
 I have to convert a string in base64 before placing it inside a
 template with puppet.
 Is there a function available and how?

not sure if there's a puppet function - do not think so. but if you're
just going to use it in the template as base64 then do this in your 
template:

require 'base64'
Base64.encode64(yourvar)

the 'require' line is probably not needed

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



[Puppet Users] Re: base64 within module

2012-10-15 Thread Paul Tötterman
Hi Luca,

I have to convert a string in base64 before placing it inside a template 
 with puppet.
 Is there a function available and how?


Puppet templates are embedded ruby, and you can do almost anything you can 
with regular ruby. So you the Base64 module from ruby:

%
require 'base64'
%
%= Base64.encode64('foobar') %

Cheers,
Paul

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



Re: [Puppet Users] Re: puppetd --tags doesnt work for some module

2012-10-15 Thread shell heriyanto
Thank you, i already solved by forcing with cobbler into, environment that
i want.

On Tue, Sep 25, 2012 at 10:05 PM, jcbollinger john.bollin...@stjude.orgwrote:



 On Tuesday, September 25, 2012 5:29:07 AM UTC-5, Heriyanto wrote:

 Thanks for your reply john, the funny thing is:

 running on production environment with environment=production option on
 puppet.conf:
 puppetd --test --env staging # its work
 puppetd --test --env staging --tags ntp  # its work
 puppetd --test --env staging --tags http # its doesn't work

 running on testing environment with environment=testing option on
 puppet.conf:
 puppetd --test --env staging # its work
 puppetd --test --env staging --tags ntp  # its work
 puppetd --test --env staging --tags http # its work

 if there is something wrong with my init.pp on testing its also doesn't
 work.

 Regards
 thanks


 On Mon, Sep 24, 2012 at 9:29 PM, jcbollinger john.bo...@stjude.orgwrote:



 On Sunday, September 23, 2012 11:55:44 PM UTC-5, Heriyanto wrote:

 Dear All,

 I have enviroment testing, staging and production for puppet,
 when i trying to test running staging on production, run command:
  puppetd --test --env staging # its work
  puppetd --test --env staging --tags ntp  # its work
  puppetd --test --env staging --tags http # its doesn't work

 Strange usually I never got a problem like this, its just not working
 for one module just for http.
 even i change enviroment on puppet.conf file from production into
 staging.



 Doesn't work means what?  Does the agent emit an error message?

 its just Finish applying catalog, without any changes.


 Does anything useful show up in the master's log?  If you run the agent
 with the --debug flag then does the additional output shed any more light
 on the problem?

 Already did, but nothing error report or something wrong.




 I already check on the other file, like site.pp and the other file.
 This working before, until i make some
 change on init.pp for http module, but my changes is nothing important
 related into this. Just copying some file.


 If you revert your changes does the expected function return?  If so,
 then I have to disagree with your assertion that the changes are
 unimportant.  If you present the old and new versions then perhaps we can
 figure out why the change had this unexpected effect.

 my change just add
   file { /etc/httpd/conf/magic:
 owner  = root,
  group  = apache,
 mode   = 640,
 source = [puppet:///http/conf/magic,
  ],
 notify = Service['httpd'],
 }


 That change did not of itself cause the behavior you describe.  Depending
 on your process, however, you may have accidentally caused other changes.
 For example, if you keep your manifests in a version control system and you
 work with a local copy, then perhaps you committed additional changes along
 with that change.  Or could someone else have made a change that caused the
 result you report?

 Alternatively, are you certain that the exact command you are now issuing
 produced different results in the past?  For example, I find it slightly
 suspicious that you are using --env instead of --environment,
 especially in light of the new information about the affect of setting the
 environment in puppet.conf.

 You can test what environment you're getting by adding this to your
 site.pp:

 notify { 'my environment':
   message = My environment is ${environment}.
 }

 My best guess at this point is that you do not declare anything tagged
 with http in environment production, whereas in some other
 environments, including testing, you do.  If you do not otherwise declare
 an environment for a node then it is placed in environment production.


 John

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/aXx0xpS43PsJ.

 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.


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



[Puppet Users] Benchmark puppetDB

2012-10-15 Thread shell heriyanto
Dear All,

I know puppetDB its more faster than storeconfigs, but to replace
storeconfigs with puppetDB into production server
Its need more explanation than some link from puppetlabs, need prove to my
bos and team.
For testing i just have 1 puppetmaster and 1 and 2 puppet agent, how i can
look different performance?
Its that any idea / or complex puppet stanza to benchmark / compare this
with storeconfigs?

Regards,
Thanks

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



[Puppet Users] Nagios server howto for beginner ?

2012-10-15 Thread ftiff
Hi all,

I would like to install a nagios server without reinventing the wheel.

I know there's nagios (client?) functionality in core puppet, and a lot of 
modules in the forge. Unfortunately, the most promising one, thias/nagios 
uses thias/apache_httpd, and I would like to stick with puppetlabs/httpd to 
prevent fragmentation.

Has anyone successfully implemented it ? Is there any official 
documentation besides the type reference ? Should I dig in thias/nagios ?

Thanks in advance,

Francois


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



Re: [Puppet Users] Nagios server howto for beginner ?

2012-10-15 Thread Matthias Saou
Hi,

Nagios servers tend to quickly become complex beasts :-) I know what
all of the advantages of managing them cleanly with puppet are, never
missing a single typical check from being added ever again being the
main one, but there are so many downsides that I'm still not entirely
convinced that it's a setup suitable for everyone. For instance, it's
quite hard to get things right in a heterogeneous environment, and
implementing simple custom checks becomes exponentially complicated.

Anyway, if you plan on trying out my module, feedback or pull requests
are very welcome. The httpd dependency on my own module can easily be
omitted with nagios::server { apache_httpd = false }, then using any
other httpd module of your choosing. Same with php = false if you
want to use your own module.
I always try to make my modules standalone, and when that's not
possible, at least leave people a way to disable dependencies on other
of my own modules so that they can use their own instead.

Good luck!
Matthias

On Mon, 15 Oct 2012 02:00:18 -0700 (PDT)
ftiff franc...@esl-education.org wrote:

 Hi all,
 
 I would like to install a nagios server without reinventing the wheel.
 
 I know there's nagios (client?) functionality in core puppet, and a
 lot of modules in the forge. Unfortunately, the most promising one,
 thias/nagios uses thias/apache_httpd, and I would like to stick with
 puppetlabs/httpd to prevent fragmentation.
 
 Has anyone successfully implemented it ? Is there any official 
 documentation besides the type reference ? Should I dig in
 thias/nagios ?
 
 Thanks in advance,
 
 Francois
 
 



-- 
Matthias Saou  ██  ██
 ██  ██
Web: http://matthias.saou.eu/  ██
Mail/XMPP:  matth...@saou.eu   ██  
   ██
GPG: 4096R/E755CC63██  ██  ██
 8D91 7E2E F048 9C9C 46AF  ██  ██  ██  ██
 21A9 7A51 7B82 E755 CC63  

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



[Puppet Users] Puppet 3 and master cert error ...

2012-10-15 Thread t00_m4d_f00
Hey all,

after installing the 3.0.0 version of puppet (debian package from 
puppetlabs), doing the initial config, doing an initial start of master to 
generate the certs needed and then starting apache with passenger to 
control puppetmaster. I can do:

puppet ca list --all

and get a listing of the certs in the system (initially only the master).

afterwards, on the client node, I run:

puppet -t -d --waitforcert 60 --server netadmin.domain.tld

The client node generates its cert and pushes to master. on master I can 
see the request with:

puppet ca list

sign the request:

puppet ca sign ns3.domain.tld

and afterwards if I do:

puppet ca list --all

I get the following:

Error: The certificate retrieved from the master does not match the agent's 
private key.
Certificate fingerprint: 
8F:24:92:B9:89:0C:E7:04:C5:3F:B6:11:F8:13:4B:6A:9E:F4:EA:08:E7:4E:75:1B:DA:1C:A6:47:04:DB:55:81
To fix this, remove the certificate from both the master and the agent and 
then start a puppet run, which will automatically regenerate a certficate.
On the master:
  puppet cert clean netadmin.domain.tld
On the agent:
  rm -f /var/lib/puppet/ssl/certs/netadmin.domain.tld.pem
  puppet agent -t

Error: Try 'puppet help ca list' for usage


Does anyone have an idea what is going on here? if not I will open a ticket.

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



[Puppet Users] Best way to set environment variables in production server with puppet

2012-10-15 Thread Rubem Azenha
Hi, 

I'm using puppet to setup a JRuby environment on my production and staging 
EC2 servers using Ubuntu Linux. I'm using a puppet recipe (is recipe the 
right term?) to install jruby.

I want to set a environment variable (in this case, JRUBY_HOME and modify 
the PATH to include JRUBY_HOME/bin) after it finishes installing jruby
Here's a gist with the recipe's content:

https://gist.github.com/3890519

So, what's the best way to add /opt/jruby as JRUBY_HOME and then add 
JRUBY_HOME/bin to PATH?  

Regards,

Rubem Azenha

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



[Puppet Users] Variables and autoloading

2012-10-15 Thread Simon Marechal
It seems to me that a few puppet modules do access variables from 
non-included classes (for example 
https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/config.pp 
look 
at how stuff is pulled out of mysql::params).

I do not understand how this is supposed to work. What happens if you do 
this from a parameterized class, and include it later with distinct 
parameters ? Is that even legal ? What about resources that might be in 
mysql::params ? Or is that just working because of the inheritance ?

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



Re: [Puppet Users] Glassfish custom provider and 'file does not exist'

2012-10-15 Thread fatmcgav
Just got back from holiday, and need to get this one going...

Any ideas on how I can proceed?

Cheers
Gavin

On 29 September 2012 08:21, fatmcgav fatmc...@gmail.com wrote:

 Stefan

 Yes, the code is all in github.
 https://github.com/fatmcgav/puppet-glassfish

 Cheers
 Gav
 On Sep 29, 2012 1:28 AM, Stefan Schulte stefan.schu...@taunusstein.net
 wrote:

 On Fri, Sep 28, 2012 at 10:39:11AM +0100, fatmcgav wrote:
  Ok, so I thought I'd take another look, and try and get some debug
 logging
  out of the provider to make sure it's constructing things correctly...
 
  I've applied the following patch to asadmin.rb, however I'm not seeing
  anything on the client trace...
 
  diff --git a/lib/puppet/provider/asadmin.rb
 b/lib/puppet/provider/asadmin.rb
   index f95d6ab..c8bd4a7 100644
   --- a/lib/puppet/provider/asadmin.rb
   +++ b/lib/puppet/provider/asadmin.rb
   @@ -8,6 +8,7 @@
passed_args.each { |arg| args  arg }
exec_args = args.join  
command = #{@resource[:asadminpath]} #{exec_args}
   +Puppet.debug(Command = #{command})
command = su - #{@resource[:user]} -c \#{command}\ if
   @resource[:user] and
  not command.match /create-service/
self.debug command
  
 
  Any ideas how I can get the provider logging???
 
  Cheers
  Gavin
 

 do you have the code somewhere? If you dropped the debug call in the
 create method or something it will never be executed if puppet thinks
 the provider is not valid at all.

 So having the actual provider code may make is more obvious why it is
 failing for you.

 -Stefan

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



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



Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Jakov Sosic
On 10/15/2012 09:13 AM, Stefan Schulte wrote:

 Is it possible to run a command to get all the desired information about
 every systems at once? This way you can implement a prefetch pattern.
 Basically you create provider instances for each system at once and
 write the current values in the @property_hash hash. Then your get methods
 just return the cached value which scales pretty well.


Yes it is possible to get all systems at once. It's what the XMLRPC call
does:

   xmlrpcresult = cobblerserver.call(get_systems)

I already do that, but I select only one system, examine the hash, and
if I notice differences from current puppet settings, approach to
running CLI commands editing that system.

Your idea would require top to bottom rewrite of provider, and I don't
have currently time for it... also, what are the benefits?

Currently I am planning to change params to properties (every param that
is not needed for creation of system can be managed as property - it's
more native way as I figured it out now).


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



[Puppet Users] Re: Puppet 3 and master cert error ...

2012-10-15 Thread t00_m4d_f00
here is more info:

puppet master config /etc/puppet/puppet
[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

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
node_terminus = exec
external_nodes = /usr/bin/env PUPPET_DASHBOARD_URL=http://localhost:
8141/dashboard /usr/share/puppet-dashboard/bin/external_node
reports = store, http
reporturl = http://netadmin.domain.tld:8141/reports/upload



steps to reproduce on master:

root@netadmin:/var/lib/puppet/ssl# puppet cert clean --all
root@netadmin:/var/lib/puppet/ssl# puppet master --no-daemonize --
verbose
   . puppetmaster startup 
Ctrl-C to stop
root@netadmin:/var/lib/puppet/ssl# puppet ca list --all
+ netadmin.domain.tld  (SHA256) 57:9D:
95:66:0C:B3:37:7C:F1:7D:B2:41:35:47:08:9F:D9:1B:9F:2C:57:F9:D1:20:3B:
1B:FE:27:37:16:87:ED
root@netadmin:/var/lib/puppet/ssl# service apache2 start
Starting web server: apache2.
---master end

---client-
root@ns3:~# cd /var/lib/puppet/ssl/
root@ns3:/var/lib/puppet/ssl# find -name *domain.tld* -delete
root@ns3:/var/lib/puppet/ssl# puppet agent -t -d --waitforcert
60
---client end-

---master--
root@netadmin:/var/lib/puppet/ssl# puppet ca list --all
+ netadmin.domain.tld  (SHA256) 57:9D:
95:66:0C:B3:37:7C:F1:7D:B2:41:35:47:08:9F:D9:1B:9F:2C:57:F9:D1:20:3B:
1B:FE:27:37:16:87:ED
root@netadmin:/var/lib/puppet/ssl# puppet ca list
  ns3.domain.tld   (SHA256) 26:72:D4:3A:9C:EE:8B:73:25:1B:
0C:EC:FB:BB:C9:DA:D9:FE:74:35:B5:F5:35:43:F5:91:82:FB:98:E7:3F:D8
root@netadmin:/var/lib/puppet/ssl/ca# puppet ca sign ns3.domain.tld
Signed certificate request for ns3.domain.tld
Removing file Puppet::SSL::CertificateRequest ns3.domain.tld at '/var/
lib/puppet/ssl/ca/requests/ns3.domain.tld.pem'
-BEGIN CERTIFICATE-
\nMIIFYTCCA0mgAwIBAgIBCjANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDDCJQdXBw
\nZXQgQ0E6IG5ldGFkbWluLm1vbC1zZXJ2ZXJzLmRlMB4XDTEyMTAxNDA5MjAzN1oX
\nDTE3MTAxNDA5MjAzN1owHTEbMBkGA1UEAwwSbnMzLm1vbC1zZXJ2ZXJzLmRlMIIC
\nIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAu6x+f9jbOHZVb6rXyymVpxPY
\n92wFIl+5FmKfQ+LhXM3CrrQURc/pDlBeqVyVEwo584c4szcS1pqQ4mv4oLla4g+P
\npuQTG9fWILTXOs59dSH6hH3Vk8nrvcQoyffs3yJsjLrJEkTQO+TCSDBVDka2RCWe
\nFKZhsQHwSMiriCrN43MqSgoLCX4BaVIryCQ03M6KCNvfkCo02Mme7GhOElnHSRAM
\nictGHeM8wjogz+WUF1V+Ox2ixucI6Oc4nSzzJ05l3hxRrTaL+u4MLRDpQjFgCDje
\nFDJB2cupwELoGvbXQollRJVIIWtpRYRb6KgOmyQq2oAzOBNruziGNLflkA5PnL0C
\nlsNBmYnTRU1sklz5Z9uxQqOfU7af0I6toXUOLI81BiaLkqfyp8gWvHWOgCt9xjOz
\nxvzv2MyfhXtJY+YkSGKartdGnqVECiUej9QdrF2fvl7mrWD76D
+yauiQtTg8zdn2\nfU0lZBQ6IKHhK7XK00c98/AcIVBrTBspnWgwWPoLJ
+mP8hsTK95azlbojpN1EHlh\nfHYR+tRcwR9c6edLpnWdJAzRtdjB5/
wOrYMuIgJXggMC7wr6vk98PFc4bvOoVt0e
\nH0inF9p217DiNhzunZKgtfrCWymKdxpCZAAceKb6Ngaj391TdleU9g8WVsoxPT99\ng
+vyKBISING84xPPAnkCAwEAAaOBmzCBmDAMBgNVHRMBAf8EAjAAMDcGCWCGSAGG\n
+EIBDQQqFihQdXBwZXQgUnVieS9PcGVuU1NMIEludGVybmFsIENlcnRpZmljYXRl
\nMA4GA1UdDwEB/wQEAwIFoDAdBgNVHQ4EFgQUcZmVS/ERSxDb8J6RSqUjs65x8tww
\nIAYDVR0lAQH/BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUA
\nA4ICAQBjjU+xRQVbY7p4atH8n2Vper7JSaS72DMc5nhLFmALG05S6S61aIjJTfSl
\nQT8h/Prm6HaltGYOV/YsRZZO2MCNdkNx0aSnuMl
+UNU1V0cWcypG7dYaODgXFPD6\nZj0/u6WnJWtbAvtrogXjkbm6XIg35rJswKx7CTJ/
hlsXhEfD8uqX88Wf6omRkL8g\nt/
IfUWmlrShjToi5CggGIderIgykHsbrsIwcXby6ab7q0hlLycPU6gtzy8xOTelW
\neXe3WSiRWUTzljVXEwp428N2QXRE+rf5LB5WZ3xl/4eCIUbGj4GbMo2xSx7lzKQG
\ng7H6w6RLVFz9SdwGffwrNNS9qMrbLv85Ism+Jh2rW1VStJu2ygi1rX47aC/o/UZa
\npWHpXMzRL922p7r9Q5N/B+EdL1U8aQvf+gZ0YAuGlRxpn0cJGmsjb24TJtEmYxBZ
\nzTGWqOraH9FAPd3aBklUw/l3SQ1Z4mfLAWIc89fnIsej1Rm7hkqOU0+jCUochFxu
\nSmHXNWmMc2P8pjjor+vhPhuN8f1x1qw8Qqhhwi4e8VnUnFD1G03d9E8Ybg8Id3sR
\nY3GDcYjgFRZsXUm8IWnz46NykE+V/zoBvGDzYpgwM0WgDORJD1DBweuP3xfTj+cJ\n/
6pUfiSQcC+ofoklbnIZ57Inc4k8xqHGc+JaxRx1Fd7VrjIktQ==\n-END
CERTIFICATE-\n
root@netadmin:/var/lib/puppet/ssl/ca# puppet ca list --all
Error: The certificate retrieved from the master does not match the
agent's private key.
Certificate fingerprint: 57:9D:
95:66:0C:B3:37:7C:F1:7D:B2:41:35:47:08:9F:D9:1B:9F:2C:57:F9:D1:20:3B:
1B:FE:27:37:16:87:ED
To fix this, remove the certificate from both the master and the agent
and then start a puppet run, which will automatically regenerate a
certficate.
On the master:
  puppet cert clean netadmin.domain.tld
On the agent:
  rm -f /var/lib/puppet/ssl/certs/netadmin.domain.tld.pem
  puppet agent -t

Error: Try 'puppet help ca list' for usage

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



[Puppet Users] Re: Puppet 3 and master cert error ...

2012-10-15 Thread t00_m4d_f00


On 15 Okt., 13:16, t00_m4d_f00 t00_m4d_...@web.de wrote:
 root@netadmin:/var/lib/puppet/ssl/ca# puppet ca list --all
 Error: The certificate retrieved from the master does not match the
 agent's private key.
 Certificate fingerprint: 57:9D:
 95:66:0C:B3:37:7C:F1:7D:B2:41:35:47:08:9F:D9:1B:9F:2C:57:F9:D1:20:3B:
 1B:FE:27:37:16:87:ED
 To fix this, remove the certificate from both the master and the agent
 and then start a puppet run, which will automatically regenerate a
 certficate.
 On the master:
   puppet cert clean netadmin.domain.tld
 On the agent:
   rm -f /var/lib/puppet/ssl/certs/netadmin.domain.tld.pem
   puppet agent -t

 Error: Try 'puppet help ca list' for usage

sorry, the error should be:

Error: The certificate retrieved from the master does not match the
agent's private key.
Certificate fingerprint: DF:D4:9A:FE:A8:B2:50:74:E3:47:15:FA:7A:D1:9E:
57:06:D5:3D:9B:A5:6D:A4:82:DF:EB:E0:4E:89:FC:97:01
To fix this, remove the certificate from both the master and the agent
and then start a puppet run, which will automatically regenerate a
certficate.
On the master:
  puppet cert clean netadmin.mol-servers.de
On the agent:
  rm -f /var/lib/puppet/ssl/certs/netadmin.mol-servers.de.pem
  puppet agent -t

Error: Try 'puppet help ca list' for usage


The cert fingerprint that is shown is different than the prints shown
prior to signing the node cert.

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



Re: [Puppet Users] Re: Migration from Puppet 2.6.7 to 3.0.0 issues

2012-10-15 Thread David Campos
I have also set preferred_serialization_format = yaml but I did need it in 
order to be able to use puppet at windows machines (they did not accept 
PSON due an OutOfMemory exception.

I'll try without that setting.

On Wednesday, October 10, 2012 10:14:22 PM UTC+2, thbe wrote:

 Hi Josh,

 2012/10/10 Josh Cooper jo...@puppetlabs.com javascript:

 [...]
 I think puppet agent is expecting yaml, and is either receiving json
 or otherwise can't parse the yaml it's receiving. We made performance
 improvements in Puppet 3 relating to yaml parsing, so perhaps that is
 the issue.


 you are the man! I had several performance and other tweaks in my standard 
 puppet.conf. One of them was preferred_serialization_format = b64_zlib_yaml 
 or preferred_serialization_format = yaml which seem to cause the error. 
 I've removed most of the tweaks and started with a more standard like 
 puppet.conf and which seem to work as expected. Now I can focus on bugfix 
 all the remaining issues occuring within the upgrade. Thanks a lot!

 Regards, Thomas
 -- 
 Linux ... enjoy the ride!



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



[Puppet Users] Create a variable variable

2012-10-15 Thread rvlinden
Hi all,
 
I'm wondering if puppet can create a variable based on another variable ??
Here is an example
 
3 global varibles
 
$::gbl_users_groups = app1,app2
$::gbl_users_accounts_app1 = app1user1,app1user2
 $::gbl_users_accounts_app2 = app2user1,app2user2
 
What does work is this
 
$groups_name_array = split($::gbl_users_accounts_app1,',')
 or
 $groups_name_array = split($::gbl_users_accounts_app2,',')
 
 
What I really want to do, is replace the static app1 and app2 within the 
$groups_name_array, to something dynamic like this
 
$groups_array = split($::gbl_users_groups,',')
 $groups_name_array = split($::gbl_users_accounts_*$groups_array*,',')
 
If have tried various combination, but just can seen to find the right one 
(if it is possible)
 
Any suggestions
 
Regards, Rene

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



Re: [Puppet Users] Connection reset by peer

2012-10-15 Thread ftiff
I had same issue, related to DNS cache. I changed the IP address in 
/etc/hosts but it was still resolving to the old IP.
on CentOS, you can flush dns cache with nscd -i hosts

Le lundi 2 mai 2011 14:43:08 UTC+2, Dmitry a écrit :

 Thank you!!!

 It was a problem with DNS-server.
 The second DNS-server, that was in resolv.conf, don't answer for requests.


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



[Puppet Users] Client 2.7 Master 3.0 possible?

2012-10-15 Thread Gregory B.
Do you know if it possible to use a master running puppet 3.0 with a client 
running puppet 2.7?

I had a look in the release notes but couldn't find the information.

Greg

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



[Puppet Users] Re: Variables and autoloading

2012-10-15 Thread jcbollinger


On Monday, October 15, 2012 4:27:06 AM UTC-5, Simon Marechal wrote:

 It seems to me that a few puppet modules do access variables from 
 non-included classes (for example 
 https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/config.pp
  look 
 at how stuff is pulled out of mysql::params).


That example works because the class inherits from mysql::params.  It is a 
pattern that has come into vogue for making another class's variables 
accessible for use as class parameter defaults.  Included classes' 
superclasses are automatically included, much as if the superclass were 
'include'd just prior to each declaration of the subclass (whether via 
parametrized syntax, 'include', or 'require').

 

 I do not understand how this is supposed to work. What happens if you do 
 this from a parameterized class, and include it later with distinct 
 parameters ?



What's this?  Are you asking about what happens if the superclass is 
itself parametrized?  That is not supported.

If you happen to do it anyway, however, the result is similar to what would 
happen if you 'include'd the superclass instead of inheriting from it -- as 
long as the parametrized declaration is parsed first, everything will 
compile and the class will have the parameters from the parametrized-form 
declaration.  If the parametrized declaration is parsed second, however, 
then catalog compilation will fail.  I advise you to avoid all that, and 
instead just don't inherit from parametrized classes.

In fact, in a reprise of my voice crying in the wilderness routine, I 
will urge you to avoid writing new parametrized classes for any context or 
purpose.  Puppet 3's integration of hiera with class parameter resolution 
provides a nice backstop for people who invested in developing parametrized 
classes, but parametrized classes still have serious deficiencies in Puppet 
3 (and worse deficiencies in Puppet 2).  Do write them.  If you need to use 
parametrized classes written by someone else, then at all costs avoid 
parametrized class declaration syntax; instead use the good old 'include' 
function (or the 'require' function).  Feed non-default parameter data to 
them via hiera (requires Puppet 3).

 

 Is that even legal ? What about resources that might be in mysql::params ? 
 Or is that just working because of the inheritance ?

 

Any resources declared in class mysql::params are assigned to nodes that 
declare any of its subclasses.  That's an aspect of Puppet class 
inheritance.


John

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



Re: [Puppet Users] Create a variable variable

2012-10-15 Thread Henrik Lindberg

Did you consider using a hash?

$x = { 'app1' = 'app1user1,app1user2', 'app2 = '...' }
$group = 'app1'
$y = split($x[$group], ',')

In the DSL it is not possible to reference a variable in a dynamic way 
(i.e. compute the variable name), but you can compute a hash key.


e.g.
$group_nrb = 1
$y = split($x[app${group_nbr}], ',')

Hope that helps
- henrik

On 2012-15-10 14:12, rvlinden wrote:

Hi all,
I'm wondering if puppet can create a variable based on another variable ??
Here is an example
3 global varibles
$::gbl_users_groups = app1,app2
$::gbl_users_accounts_app1 = app1user1,app1user2
$::gbl_users_accounts_app2 = app2user1,app2user2
What does work is this
$groups_name_array = split($::gbl_users_accounts_app1,',')
  or
$groups_name_array = split($::gbl_users_accounts_app2,',')
What I really want to do, is replace the static app1 and app2 within the
$groups_name_array, to something dynamic like this
$groups_array = split($::gbl_users_groups,',')
$groups_name_array = split($::gbl_users_accounts_*$groups_array*,',')
If have tried various combination, but just can seen to find the right
one (if it is possible)
Any suggestions
Regards, Rene

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



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



[Puppet Users] Re: Best way to set environment variables in production server with puppet

2012-10-15 Thread jcbollinger


On Sunday, October 14, 2012 9:31:38 PM UTC-5, Rubem Azenha wrote:

 Hi, 

 I'm using puppet to setup a JRuby environment on my production and staging 
 EC2 servers using Ubuntu Linux. I'm using a puppet recipe (is recipe the 
 right term?) to install jruby.

 I want to set a environment variable (in this case, JRUBY_HOME and modify 
 the PATH to include JRUBY_HOME/bin) after it finishes installing jruby
 Here's a gist with the recipe's content:

 https://gist.github.com/3890519

 So, what's the best way to add /opt/jruby as JRUBY_HOME and then add 
 JRUBY_HOME/bin to PATH?  


You have a critical misunderstanding here that informs the available 
solutions.  Environment variables do not float about in the aether; they 
are called environment variables because they are associated with 
specific environments.  So the first question to answer is *which 
environments* need those variables?

Supposing you mean that you want all users' default shell environments to 
have those variables by default, you should follow the conventions of your 
OS distribution.  RedHat-family Linux distros, for instance, drop shell 
setup files in /etc/profile.d.  On one of those distros you might therefore 
create /etc/profile.d/juby.sh and /etc/profile.d/juby.csh with the needed 
environment variable declarations for Bourne and C shell family shells, 
respectively.  Those files will be 'source'd by users' login shells.

Really, though, everything you're doing ought to be rolled into a package.  
If there isn't already one available for you then consider creating one and 
putting it in your own repository.  It's not that hard.


John

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



Re: [Puppet Users] Re: Help- Parsing data from a yaml file using puppet 3.0 and hiera

2012-10-15 Thread jcbollinger


On Friday, October 12, 2012 3:37:47 PM UTC-5, Nishant Jain wrote:

 Thanks John,
I actually got it working exactly using 
 hiera($users) and then defining a resource and passing the array to the 
 defined resource which makes it run for every element of the array.
 I guess that was again one of your post, where you have described the 
 approach to perform iterations in puppet
 http://www.mail-archive.com/puppet-users@googlegroups.com/msg29238.html


 Can you please provide some good links to the tutorials where I can learn 
 more about using hiera, as it looks to me like one of the major souce of 
 externalizing data.


The product documentation is here: https://github.com/puppetlabs/hiera.

Googling hiera tutorial yields lots of hits; I can't say which are the 
good ones.


John

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



[Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-15 Thread jcbollinger


On Friday, October 12, 2012 12:10:38 PM UTC-5, Ellison Marks wrote:

 Not to let this thread go to waste...

 Since I'm now trying to move away from the hiera functions themselves to 
 the parameter style



Why?  The ability to achieve separation of data from code while avoiding 
parametrized classes is one of the greatest advantages conferred by hiera.  
Every parametrized-style class declaration (not definition) in your 
manifests is a bug waiting to happen.  And if you're not going to use such 
declarations, then why do you want to spend effort on converting your 
classes to make it possible?


John

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



[Puppet Users] Re: Variables and autoloading

2012-10-15 Thread jcbollinger


On Monday, October 15, 2012 9:03:50 AM UTC-5, jcbollinger wrote:

 [...] parametrized classes still have serious deficiencies in Puppet 3 
 (and worse deficiencies in Puppet 2).  Do write them.


I meant do *not* write them, of course.


John

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



Re: [Puppet Users] Re: Variables and autoloading

2012-10-15 Thread Matt Zagrabelny
On Mon, Oct 15, 2012 at 9:38 AM, jcbollinger john.bollin...@stjude.org wrote:


 On Monday, October 15, 2012 9:03:50 AM UTC-5, jcbollinger wrote:

 [...] parametrized classes still have serious deficiencies in Puppet 3
 (and worse deficiencies in Puppet 2).  Do write them.


 I meant do not write them, of course.

John,

Can you suggest an alternative to parameterized classes?

-mz

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



Re: [Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-15 Thread R.I.Pienaar


- Original Message -
 From: jcbollinger john.bollin...@stjude.org
 To: puppet-users@googlegroups.com
 Sent: Monday, October 15, 2012 3:35:30 PM
 Subject: [Puppet Users] Re: Puppet 3.0.0 and Hiera
 
 
 
 On Friday, October 12, 2012 12:10:38 PM UTC-5, Ellison Marks wrote:
 
 Not to let this thread go to waste...
 
 Since I'm now trying to move away from the hiera functions themselves
 to the parameter style
 
 
 Why? The ability to achieve separation of data from code while
 avoiding parametrized classes is one of the greatest advantages
 conferred by hiera. Every parametrized-style class declaration (not
 definition) in your manifests is a bug waiting to happen. And if
 you're not going to use such declarations, then why do you want to
 spend effort on converting your classes to make it possible?
 
 

the param classes integration with hiera in puppet 3 does make it
worth taking another look at param classes:

The code:

  class x($y=hello) {
notify{$y: }
  }

  include x
  include x


actually works fine, note this is basically your old school puppet
syntax, multiple calls to include etc, but with hiera integration
for the variable key x::y.

this deals with the dynamic scoping problem, deals with most of the
things I hate(d) about param classes and gives me magical abilities
to do overrides where and how I need them.

You can still if u wish use the new param classes style of including,
ENC etc can all supply data just like always.

from a code share perspective this is a big win, simply using param 
classes means your module is forwards and backwards compatible with
hiera or without hiera.

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



Re: [Puppet Users] Client 2.7 Master 3.0 possible?

2012-10-15 Thread Jeff McCune
On Monday, October 15, 2012, Gregory B. wrote:

 Do you know if it possible to use a master running puppet 3.0 with a
 client running puppet 2.7?


Yes, a master at 3.0 is backwards compatible with a 2.7 agent.

-Jeff

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



[Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread windowsrefund



 That way updates are simpler for users, and development from source is 
 simpler for developers.



And yet, I haven't heard a single user say anything to the affect of 
please make us jump through additional hoops in order to download the Free 
Software releases. In fact, this thread exists because users are speaking 
out against the change made to the traditional download path. It would be 
nice to see the site reverted back to the previous behavior. Believe me, 
users who want PE will get it without having it pushed on them.

Best,
Adam Kosmin 

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



Re: [Puppet Users] augeas only add if doesn't exist

2012-10-15 Thread Eugene Vilensky

On Oct 14, 2012, at 12:40 PM, Dominic Cleal dcl...@redhat.com wrote:

 You're missing quotes around nrpe, the command should be:
 
 set /files/etc/hosts.allow/*[process='nrpe']/client[last()+1] 1.1.1.1
 
 rodjek's example has the quotes in, so just a transcription error.


Totally works for an existing 'nrpe' node (thanks!) but not if it does not 
exist.  I don't suppose there is a simple create onlyif not exists 
expression? (http://augeas.net/page/Path_expressions)

-Eugene

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



[Puppet Users] Change Tab behavior in 3.0+

2012-10-15 Thread Tom Swartz
Hey all,

I have a question regarding the choice to move to spaces (rather than tabs) 
in the editor.

May I ask the reasoning behind this?

Furthermore, is there a way to revert to the 'old style' that used tabs 
instead? I prefer this, as it makes the code look cleaner.

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



[Puppet Users] Re: Change Tab behavior in 3.0+

2012-10-15 Thread Tom Swartz
I should say that this referrs to Geppetto and the Geppetto Eclipse plugin. 
Sorry.

If this is the wrong group to post, could someone point me to the proper 
section?

On Monday, October 15, 2012 11:57:38 AM UTC-4, Tom Swartz wrote:

 Hey all,

 I have a question regarding the choice to move to spaces (rather than 
 tabs) in the editor.

 May I ask the reasoning behind this?

 Furthermore, is there a way to revert to the 'old style' that used tabs 
 instead? I prefer this, as it makes the code look cleaner.


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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Jeffrey Watts
My view on the matter has always been this.  Most people already know how
to find Puppet (it's usually in their distribution already).  This change
might inconvenience people slightly, but it's not a big deal for the
technically adept.  The folks who aren't technically adept should use their
distribution provided version or they ought to be buying PE.

PuppetLabs is a company that makes its money off of Puppet Enterprise.  I
see nothing wrong with them promoting it or making it the easiest download.
 They want new folks to see PE first, get it, love it, and not want to
leave it.  Making the Open Source version more prominently featured on
their site doesn't help their business model.  I feel that their business
model is a good one, and good for everyone - companies that want a more
bundled product with support can pay for a product that pays the salaries
of developers who make the Open Source version better.

Jeffrey.

P.S.  I don't use Puppet Enterprise.


On Mon, Oct 15, 2012 at 10:42 AM, windowsrefund windowsref...@gmail.comwrote:

 And yet, I haven't heard a single user say anything to the affect of
 please make us jump through additional hoops in order to download the Free
 Software releases. In fact, this thread exists because users are speaking
 out against the change made to the traditional download path. It would be
 nice to see the site reverted back to the previous behavior. Believe me,
 users who want PE will get it without having it pushed on them.



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



Re: [Puppet Users] Puppet Forge: Are my expectations misaligned?

2012-10-15 Thread Felipe Salum
I would love to have time for that :) but I will try to help converting the 
modules I made to use on my company to the forge standard. I wrote my first 
forge module last week, added documentation, everything on parameterized 
classes and easy to use and install.

I appreciate any feedbacks so I can make that a standard to move all my 
other modules.

https://forge.puppetlabs.com/fsalum/newrelic

Regards,
Felipe

On Sunday, October 14, 2012 12:15:53 PM UTC-7, Christopher Wood wrote:

 On Sun, Oct 14, 2012 at 11:53:41AM -0700, Felipe Salum wrote: 
 I would love to see puppet forge as we have the distribution 
 repositories.. Modules audited, tested and maybe fixed 

 (SNIP) 

 Sounds like you just volunteered. 


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



Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Stefan Schulte
On Mon, Oct 15, 2012 at 01:09:09PM +0200, Jakov Sosic wrote:
 On 10/15/2012 09:13 AM, Stefan Schulte wrote:
 
  Is it possible to run a command to get all the desired information about
  every systems at once? This way you can implement a prefetch pattern.
  Basically you create provider instances for each system at once and
  write the current values in the @property_hash hash. Then your get methods
  just return the cached value which scales pretty well.
 
 
 Yes it is possible to get all systems at once. It's what the XMLRPC call
 does:
 
xmlrpcresult = cobblerserver.call(get_systems)
 
 I already do that, but I select only one system, examine the hash, and
 if I notice differences from current puppet settings, approach to
 running CLI commands editing that system.
 
 Your idea would require top to bottom rewrite of provider, and I don't
 have currently time for it... also, what are the benefits?
 
 Currently I am planning to change params to properties (every param that
 is not needed for creation of system can be managed as property - it's
 more native way as I figured it out now).
 

The fact that your exists? method does not really answer the question if
a resource is present or absent is a bit strange. And inside the create
method you are basically reimplementing properties with parameters. If
something has to be checked for correctness it should be a property.
Otherwise it is a parameter. Like the service resource: enable is a
property because it can be out of sync. hasstatus is a parameter because
it cannot be out of sync but only changes the behaviour of the provider

Your main concern against properties if I got you correctly was about
speed because puppet would run one query for each property. One way around
that is to implement a query method that will query all properties at once
and store them in a hash (@property_hash). Every get-method now check
if @property_hash[:some_property] does already exist and return that
value if it does or run the query method that would populate the
@property_hash hash.

Another speed improvement is to implement an `instances` and `prefetch`
method. That has the benefit that puppet does react on such methods
if they are implemented:

* you are able to run puppet resource cobblersystem on the command
  line to get the current configuration of all systems (that depends on
  an instances classmethod)
* you can use the resources type to purge unmanaged systems

resources { 'cobblersystem':
  purge = true
}
* the prefetch method is automatically called by puppet if implemented
  to create provider instances
* your get methods become trivial

-Stefan

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread windowsrefund
This has nothing to do with being adept and also has nothing to do with 
PL's business model. For a Free Software zealot such as myself, the 
software and it's community is far more important. It was bad enough to see 
the business agenda decide to switch to a non-copyleft license and now 
we're seeing the free software version treated like a red headed 
step-child. We've seen this trend play itself out hundreds of times over 
the years and it's starting to look like PL is turning out to be a wolf in 
sheep's clothing. We'll see...


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



[Puppet Users] Is there a way to use an include statement in puppet.conf

2012-10-15 Thread Worker Bee
Hi Everyone;

I was just wondering if it is possible to use 'inlcude' in the puupet.conf
file?

For example, can I have a file that contains the settings for the maters
(ex. master.pp) and then include in the puppet.conf?

ex:
include 'master.pp'

Thanks!

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



Re: [Puppet Users] Is there a way to use an include statement in puppet.conf

2012-10-15 Thread Ramin K

On 10/15/2012 10:43 AM, Worker Bee wrote:

Hi Everyone;

I was just wondering if it is possible to use 'inlcude' in the
puupet.conf file?

For example, can I have a file that contains the settings for the maters
(ex. master.pp) and then include in the puppet.conf?

ex:
include 'master.pp'

Thanks!


I'm a fan of separate files for master and agent which is simple to 
setup if you're running your master in any way other than the webrick 
puppetmaster process.


/etc/puppet/puppetmaster.conf

config.ru
ARGV  --rack
ARGV  --config=/etc/puppet/puppetmaster.conf

Ramin

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



Re: [Puppet Users] Benchmark puppetDB

2012-10-15 Thread Nan Liu
On Mon, Oct 15, 2012 at 1:41 AM, shell heriyanto
shell.heriya...@gmail.com wrote:
 I know puppetDB its more faster than storeconfigs, but to replace
 storeconfigs with puppetDB into production server
 Its need more explanation than some link from puppetlabs, need prove to my
 bos and team.
 For testing i just have 1 puppetmaster and 1 and 2 puppet agent, how i can
 look different performance?
 Its that any idea / or complex puppet stanza to benchmark / compare this
 with storeconfigs?

A catalog compile should show the difference in speed (especially one
with large number of resources). This is discussed in the Puppet DB
blog post. Also Deepak has great talk at Puppet Conf discussing why
PuppetDB is async (which isn't something quite as easy to benchmark
with just 2 agents):

http://youtu.be/xw83cRofkpM

HTH,

Nan

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



Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Jakov Sosic
On 10/15/2012 07:23 PM, Stefan Schulte wrote:

 The fact that your exists? method does not really answer the question if
 a resource is present or absent is a bit strange. And inside the create
 method you are basically reimplementing properties with parameters. If
 something has to be checked for correctness it should be a property.
 Otherwise it is a parameter. Like the service resource: enable is a
 property because it can be out of sync. hasstatus is a parameter because
 it cannot be out of sync but only changes the behaviour of the provider

OK, I've figured that out through this conversation...

Now this is somewhat fixed code:

http://pastebin.com/q0TBX4KB

I've moved some params to properties.


 Your main concern against properties if I got you correctly was about
 speed because puppet would run one query for each property. One way around
 that is to implement a query method that will query all properties at once
 and store them in a hash (@property_hash). Every get-method now check
 if @property_hash[:some_property] does already exist and return that
 value if it does or run the query method that would populate the
 @property_hash hash.

That sounds interesting, and more important it seems to me that complete
rewrite is not necessary in this case. Do you have some examples of this
idea?


 Another speed improvement is to implement an `instances` and `prefetch`
 method. That has the benefit that puppet does react on such methods
 if they are implemented:
 
 * you are able to run puppet resource cobblersystem on the command
   line to get the current configuration of all systems (that depends on
   an instances classmethod)
 * you can use the resources type to purge unmanaged systems
 
 resources { 'cobblersystem':
   purge = true
 }
 * the prefetch method is automatically called by puppet if implemented
   to create provider instances
 * your get methods become trivial

Wow, sounds very interesting.

I would plea for possible examples :)

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Jeffrey Watts
I admire your conviction but keep in mind that Red Hat and others have done
a similar thing and it's only been good for the community.  Perhaps you
don't use RHEL, but you certainly use one of the many innovations that were
funded by dollars that came from RHEL subscriptions.

I also think you're being overly dramatic and exaggerating when you say
that it's treated like a red headed step-child.  We disagree but I think
what's changed is pretty minor in the big scheme of things.

Jeffrey.

On Mon, Oct 15, 2012 at 12:39 PM, windowsrefund windowsref...@gmail.comwrote:

 This has nothing to do with being adept and also has nothing to do with
 PL's business model. For a Free Software zealot such as myself, the
 software and it's community is far more important. It was bad enough to see
 the business agenda decide to switch to a non-copyleft license and now
 we're seeing the free software version treated like a red headed
 step-child. We've seen this trend play itself out hundreds of times over
 the years and it's starting to look like PL is turning out to be a wolf in
 sheep's clothing. We'll see...




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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Nigel Kersten


On Monday, October 15, 2012 10:39:07 AM UTC-7, windowsrefund wrote:

 This has nothing to do with being adept and also has nothing to do with 
 PL's business model. For a Free Software zealot such as myself, the 
 software and it's community is far more important. It was bad enough to see 
 the business agenda decide to switch to a non-copyleft license and now 
 we're seeing the free software version treated like a red headed 
 step-child. We've seen this trend play itself out hundreds of times over 
 the years and it's starting to look like PL is turning out to be a wolf in 
 sheep's clothing. We'll see...


We've hired and dedicated an experienced community manager for the 
community. 

In the last quarter we've released Puppet 3.0, PuppetDB 1.0, Hiera 1.0, and 
multiple MCollective releases, all great open source projects. 

Don't you think treated like a red headed step-child is rather hyperbolic?


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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread windowsrefund


On Monday, October 15, 2012 3:02:00 PM UTC-4, Jeffrey Watts wrote:

 I admire your conviction but keep in mind that Red Hat and others have 
 done a similar thing and it's only been good for the community.  Perhaps 
 you don't use RHEL, but you certainly use one of the many innovations that 
 were funded by dollars that came from RHEL subscriptions.



Nothing about RHEL has anything to do with this thread. 
 


 I also think you're being overly dramatic and exaggerating when you say 
 that it's treated like a red headed step-child.  We disagree but I think 
 what's changed is pretty minor in the big scheme of things.


I don't think I'm being dramatic at all. I'm simply pointing out my 
observations when I consider PL's change of direction lately. Again, the 
move from a copyleft to a non-copyleft license kicked things off. This was 
followed by catering to the Windows crowd and now the front-end is pushing 
PE on the community. Look, if it's no big deal and such a minor change, why 
hasn't the download link just been reverted? In other words, I'm thinking 
PL does in fact see this as a big deal.

I'm simply voicing my distaste.

Adam Kosmin 


 Jeffrey.

 On Mon, Oct 15, 2012 at 12:39 PM, windowsrefund 
 window...@gmail.comjavascript:
  wrote:

 This has nothing to do with being adept and also has nothing to do with 
 PL's business model. For a Free Software zealot such as myself, the 
 software and it's community is far more important. It was bad enough to see 
 the business agenda decide to switch to a non-copyleft license and now 
 we're seeing the free software version treated like a red headed 
 step-child. We've seen this trend play itself out hundreds of times over 
 the years and it's starting to look like PL is turning out to be a wolf in 
 sheep's clothing. We'll see...





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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Jeffrey Watts
On Mon, Oct 15, 2012 at 2:20 PM, windowsrefund windowsref...@gmail.comwrote:


 Nothing about RHEL has anything to do with this thread.


Well, I used it as an example of a similar business model.  I think it's a
very germane comparison.  Both are commercial companies that sell support
for Open Source programs and also sell proprietary products.  Both
contribute considerably to FOSS.  But apparently you disagree that it's a
relevant comparison - though you decline to state why.


 I don't think I'm being dramatic at all. I'm simply pointing out my
 observations when I consider PL's change of direction lately. Again, the
 move from a copyleft to a non-copyleft license kicked things off. This was
 followed by catering to the Windows crowd and now the front-end is pushing
 PE on the community. Look, if it's no big deal and such a minor change, why
 hasn't the download link just been reverted? In other words, I'm thinking
 PL does in fact see this as a big deal.

 I'm simply voicing my distaste.


Well then perhaps I ought to point out that your distaste reeks of drama
and isn't very constructive.  One thing I learned a long time ago is that
hyperbole and hostility, while certainly making one feel self-righteous, in
the end is pretty worthless as an instrument of change.

But perhaps somehow, things will be different this time and your efforts
will bear fruit.  Good luck!
Jeffrey.

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



Re: [Puppet Users] Error: Not authorized to call find on /file_metadata/files

2012-10-15 Thread shoerner
Thank you for this! I just found this thread while trying to deal with the 
exact same problem (for a few days now). Changed the configuration and 
suddenly it works.

On Friday, October 12, 2012 3:13:41 PM UTC-4, Josh Cooper wrote:

 Hi Rodolfo, 

 On Fri, Oct 12, 2012 at 10:16 AM, Rodolfo Pilas rpi...@pil.asjavascript: 
 wrote: 
  Thomas, understand that my my calls are ok, like this one: 
  
   source = puppet:///files/ntp/ntp.conf, 
  
  Thanks, Rodolfo 
  
  
  El viernes, 12 de octubre de 2012 15:07:19 UTC-2, thbe escribió: 
  
  Hi Rodolfo, 
  
  2012/10/12 Rodolfo Pilas r...@pil.as 
  
  [...] 
  Error: Not authorized to call find on /file_metadata/files 
  Can you tell me any suggestion to solve this issue? 
  
  
  how do specify your files? With 3.x I had to change my calls from: 
  
  puppet:://puppetservername/modulename/file 
  
  to 
  
  puppet:///modules/modulename/file 
  
  This solved my occurence of the file_metadata error. 
  
  Regards, Thomas 
  -- 
  Linux ... enjoy the ride! 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/puppet-users/-/CrlwremHxvIJ. 
  
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  puppet-users...@googlegroups.com javascript:. 
  For more options, visit this group at 
  http://groups.google.com/group/puppet-users?hl=en. 

 The fileserver parser has not been updated to accept `allow_ip` 
 statements. See http://projects.puppetlabs.com/issues/16686 

 Josh 

 -- 
 Josh Cooper 
 Developer, Puppet Labs 


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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread windowsrefund


On Monday, October 15, 2012 3:38:47 PM UTC-4, Jeffrey Watts wrote:

 On Mon, Oct 15, 2012 at 2:20 PM, windowsrefund 
 window...@gmail.comjavascript:
  wrote:


 Nothing about RHEL has anything to do with this thread. 


 Well, I used it as an example of a similar business model.  I think it's a 
 very germane comparison.  Both are commercial companies that sell support 
 for Open Source programs and also sell proprietary products.  Both 
 contribute considerably to FOSS.  But apparently you disagree that it's a 
 relevant comparison - though you decline to state why


Well for starters, this isn't a RHEL mailing list and we're not talking 
about the RHEL solution. If we're going to just start comparing things in 
order to find justification for any and all actions, why stop there? Let's 
compare to Apple, Microsoft, the bagel I had for breakfast this morning, 
the outcome of the election and anything else totally irrelevant 
 


 I'm simply voicing my distaste.


 Well then perhaps I ought to point out that your distaste reeks of drama 
 and isn't very constructive.  One thing I learned a long time ago is that 
 hyperbole and hostility, while certainly making one feel self-righteous, in 
 the end is pretty worthless as an instrument of change.


Look, don't start trying to paint me in a negative light here. I'm not the 
one who has taken specific actions designed to alienate the free software 
community. Let's get back to the topic at hand. Someone obviously made the 
decision to make the community jump through yet another hoop in order to 
obtain and therefore, use, the free software version over PE. Who made that 
decision and how was that justified? More importantly, who is making the 
call to not revert the page now that objections have been raised?

Best,
Adam Kosmin 

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



Re: [Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-15 Thread jcbollinger


On Monday, October 15, 2012 9:49:38 AM UTC-5, R.I. Pienaar wrote:



 - Original Message - 
  From: jcbollinger
  To: puppet...@googlegroups.com javascript: 
  Sent: Monday, October 15, 2012 3:35:30 PM 
  Subject: [Puppet Users] Re: Puppet 3.0.0 and Hiera 
  
  
  
  On Friday, October 12, 2012 12:10:38 PM UTC-5, Ellison Marks wrote: 
  
  Not to let this thread go to waste... 
  
  Since I'm now trying to move away from the hiera functions themselves 
  to the parameter style 
  
  
  Why? The ability to achieve separation of data from code while 
  avoiding parametrized classes is one of the greatest advantages 
  conferred by hiera. Every parametrized-style class declaration (not 
  definition) in your manifests is a bug waiting to happen. And if 
  you're not going to use such declarations, then why do you want to 
  spend effort on converting your classes to make it possible? 
  
  

 the param classes integration with hiera in puppet 3 does make it 
 worth taking another look at param classes: 



Indeed, I have taken a second look, and a third, and maybe more.  I love 
the hiera integration with parametrized classes.  It was a fabulous idea, 
as it makes it reasonable and safe to use existing parametrized classes 
(provided you use only 'include' or 'require' to declare them).

Even with that, however, parametrized classes offer very little of value 
over non-parametrized analogs that implement the same hiera-based external 
data access.  One could argue, perhaps, that there is a documentary 
advantage in parametrization, but I think that's poor justification for 
introducing functional (so to speak) elements to any class.  That's what 
comments are for.

 


 The code: 

   class x($y=hello) { 
 notify{$y: } 
   } 

   include x 
   include x 


 actually works fine, note this is basically your old school puppet 
 syntax, multiple calls to include etc, but with hiera integration 
 for the variable key x::y. 



Yes, that's great.  The problem is that

include x
class { 'x': y = 'goodbye' }

blows up.  On the other hand, I understand that

class { 'x': y = 'goodbye' }
include x

works again, which may be even worse (poor consistency).

Of course in that simple example you can just remove either duplicate 
declaration, but in real-world examples those declarations are likely to be 
in different classes, maybe in different modules.  Even if the problem is 
known to the site maintainer, it's not necessarily easy to ensure that 
those declarations are parsed in an order that will work.

The problem is not the parametrized classes themselves, and certainly not 
the hiera integration, but rather the parametrized-style declarations.  
Indeed, it was true at least in 2.7 that parametrized-style declarations 
could cause you trouble for non-parametrized classes:

class z {
  notify { 'z': }
}

class { 'z': }
include 'z'  # kapow!


As far as I have been able to determine -- and I've been looking -- Puppet 
3 carries over 2.7's biggest problems attending parametrized class 
declarations.  It's easy enough in Puppet 3 to just avoid using 
parametrized-style declarations (yay!), but if you're going to avoid using 
them then where's the value in modifying existing classes to support using 
them?
 


 this deals with the dynamic scoping problem, deals with most of the 
 things I hate(d) about param classes and gives me magical abilities 
 to do overrides where and how I need them.



The alternative I would recommend to anyone is this:

class x {
  $y = hiera('y', 'hello')
  notify{$y: } 
}

coupled with avoiding parametrized-style class declarations.  It solves the 
dynamic scoping problem exactly as well as does the parametrized version 
does.  It is slightly more verbose than the parametrized version, but more 
explicit about what's happening.

That's what I gathered the OP's classes looked like to begin with, since he 
said he was using the hiera functions.  So I ask again, given classes 
structured similar to that, why would it be worth the investment in time 
and effort to convert them to parametrized classes?

 


 You can still if u wish use the new param classes style of including, 
 ENC etc can all supply data just like always. 

 from a code share perspective this is a big win, simply using param 
 classes means your module is forwards and backwards compatible with 
 hiera or without hiera. 



Ok, so there's at least one fair consideration.  If you are looking to 
write classes that are backwards-compatible with Puppet 2.[67] setups not 
augmented with hiera, then parametrized classes are a way to do it.  They 
may even be the best way.  I don't think you do users any favors by doing 
so, however; I would prefer to just make my modules depend on hiera, and 
let that be a threshold issue for 2.x sites.

Indeed, I personally look at it quite the other way around: hiera 
integration makes parametrized classes tolerable.  It provides a good way 
forward for the many people who wrote and now 

Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Jeffrey Watts
On Mon, Oct 15, 2012 at 3:05 PM, windowsrefund windowsref...@gmail.comwrote:

 Well for starters, this isn't a RHEL mailing list and we're not talking
 about the RHEL solution. If we're going to just start comparing things in
 order to find justification for any and all actions, why stop there? Let's
 compare to Apple, Microsoft, the bagel I had for breakfast this morning,
 the outcome of the election and anything else totally irrelevant


If you're going to disregard arguments that don't support your conclusions
then you're not interested in a serious discussion.


 Look, don't start trying to paint me in a negative light here. I'm not the
 one who has taken specific actions designed to alienate the free software
 community. Let's get back to the topic at hand. Someone obviously made the
 decision to make the community jump through yet another hoop in order to
 obtain and therefore, use, the free software version over PE. Who made that
 decision and how was that justified? More importantly, who is making the
 call to not revert the page now that objections have been raised?


Windows (may I call you by your first name?), you seem to forget that I
complimented your ideals before politely disagreeing.  Your responses have
been disproportionate to the discussion.  Right now it's my opinion that
you're more interested in ranting and raving on the Internet behind a
dubious nom de plume than having a real discussion on this issue.  Please
prove me wrong.

Jeffrey.

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



Re: [Puppet Users] Re: Variables and autoloading

2012-10-15 Thread jcbollinger


On Monday, October 15, 2012 9:43:48 AM UTC-5, Matt Zagrabelny wrote:

 Can you suggest an alternative to parameterized classes? 


Funny that you ask.  I just did exactly that a few doors down: 
https://groups.google.com/forum/#!msg/puppet-users/dICUPHn3azY/b0wJaiSbs8kJ 
.  I'm afraid I waxed long-winded, but there is an example in there.  
Basically, though, it's to use hiera, and to do so explicitly instead of 
via 3.0's hiera / class parameter integration.


John

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



[Puppet Users] Puppet not picking up files

2012-10-15 Thread Dan
Hi 

I largely copied the example in 
http://docs.puppetlabs.com/learning/modules1.html. But I'm getting an error 
when running the following from the client:

puppet agent --server puppetmaster --waitforcert 60 --test
err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not 
retrieve information from environment production source(s) 
file:/etc/puppet/modules/ntp/files/ntp.conf at 
/etc/puppet/modules/ntp/manifests/init.pp:28

on the puppet server I have the following:

# init.pp

class ntp {
  case $operatingsystem {
sles: {
  $service_name = 'ntpd'
  $conf_file= 'ntp.conf'
}
  }

#  package { 'ntp':
#ensure = installed,
#  }

  service { 'ntp':
name  = $service_name,
ensure= running,
enable= true,
subscribe = File['ntp.conf'],
  }

  file { 'ntp.conf':
path= '/etc/ntp/ntp.conf',
ensure  = file,
#require = Package['ntp'],
#   source   = puppet:///modules/ntp/files/${conf_file},
source   = /etc/puppet/modules/ntp/files/${conf_file},
  }
}


Furhter info from puppet server:

puppet apply --configprint:
/etc/puppet/modules:/usr/share/puppet/modules
pluginsource = puppet://puppet/plugins
pluginsync = false


Can someone please help me please, as I'm lost with this error?

Thanks in advance
Dan


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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread windowsrefund



 Windows (may I call you by your first name?), you seem to forget that I 
 complimented your ideals before politely disagreeing.  Your responses have 
 been disproportionate to the discussion.  Right now it's my opinion that 
 you're more interested in ranting and raving on the Internet behind a 
 dubious nom de plume than having a real discussion on this issue.  Please 
 prove me wrong.


Jeff,

Not sure if it's your browser settings but my name is Adam Kosmin. If you 
scroll up and review, you'll see no nom, no de, and no plume. Also, I'm not 
here to prove anything to you. As you can see, I've raised a serious 
discussion and have kept it on track despite your obvious attempts to 
derail the thread into something petty and personal. 

So, if you can answer the outstanding questions (see above), fee free to 
contribute. Otherwise, please find another thread to hijack.

Thanks,
Adam Kosmin  


 Jeffrey.



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



Re: [Puppet Users] Puppet not picking up files

2012-10-15 Thread Ryan Coleman
On Mon, Oct 15, 2012 at 1:58 PM, Dan dan.tr...@gmail.com wrote:

 #   source   = puppet:///modules/ntp/files/${conf_file},
 source   = /etc/puppet/modules/ntp/files/${conf_file},


It's these lines. What you want to do is specify where the configuration
file exists on the puppet master using a syntax like this:

puppet://optional puppet master/modules/module name/configuration
file in files directory,

Try: source = puppet:///modules/ntp/${conf_file},

Puppet assumes the files directory so it was looking for
/etc/puppet/modules/ntp/files/files/ntp.conf

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



Re: [Puppet Users] Change Tab behavior in 3.0+

2012-10-15 Thread Matt Zagrabelny
On Mon, Oct 15, 2012 at 10:57 AM, Tom Swartz tom.swart...@gmail.com wrote:
 Hey all,

 I have a question regarding the choice to move to spaces (rather than tabs)
 in the editor.

 May I ask the reasoning behind this?

Tabs render to different number of spaces depending on the program or
user preference. There are a truckload of reasons to not use them.

http://www.yaml.org/faq.html
http://flylib.com/books/en/2.146.1.26/1/

-mz

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Daniel Pittman
On Monday, October 15, 2012 2:07:16 PM UTC-7, windowsrefund wrote:



 Windows (may I call you by your first name?), you seem to forget that I 
 complimented your ideals before politely disagreeing.  Your responses have 
 been disproportionate to the discussion.  Right now it's my opinion that 
 you're more interested in ranting and raving on the Internet behind a 
 dubious nom de plume than having a real discussion on this issue.  Please 
 prove me wrong.


 Jeff,

 Not sure if it's your browser settings but my name is Adam Kosmin. If you 
 scroll up and review, you'll see no nom, no de, and no plume. Also, I'm not 
 here to prove anything to you. As you can see, I've raised a serious 
 discussion and have kept it on track despite your obvious attempts to 
 derail the thread into something petty and personal. 

 So, if you can answer the outstanding questions (see above), fee free to 
 contribute. Otherwise, please find another thread to hijack.


Hi.

I am going to have to ask both of you to stay polite, and avoid personal 
attacks, if you want to continue to discuss this as part of the Puppet 
mailing list.

Adam, for better or worse, all your messages show up to me as being from 
windowsrefund.

Jeffrey, Adam had used his name several times in the body of the messages 
you responded to.


As a company we welcome debate, and disagreement, around how we run our 
business.  They often mirror internal discussions that we have had about 
exactly the same set of topics.

We do require that they remain polite, and impersonal.

Thank you. 

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



[Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-15 Thread Ellison Marks
On Monday, October 15, 2012 7:35:30 AM UTC-7, jcbollinger wrote:



 On Friday, October 12, 2012 12:10:38 PM UTC-5, Ellison Marks wrote:

 Not to let this thread go to waste...

 Since I'm now trying to move away from the hiera functions themselves to 
 the parameter style



 Why?  The ability to achieve separation of data from code while avoiding 
 parametrized classes is one of the greatest advantages conferred by hiera.  
 Every parametrized-style class declaration (not definition) in your 
 manifests is a bug waiting to happen.  And if you're not going to use such 
 declarations, then why do you want to spend effort on converting your 
 classes to make it possible?


 John


Er, perhaps I wasn't being clear, which is entirely possible.

I don't intend to use parametrized declarations(Right now I'm simply using 
hiera_include in the default node for everything and loving it). I do 
however, very much like the convenience of the new syntax. In addition, my 
use case for default values in the puppet backend that shipped with the 
class wasn't terribly complex, so simply including a default value in the 
class itself serves my needs well.

In my case, the new features are simply a more convenient way of doing what 
i was already doing(sans the array and hash functionality).

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread windowsrefund

Daniel,

Thanks for stepping in. Do you have insight into the questions I've 
submitted?

All the best,
Adam Kosmin

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



Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Stefan Schulte
On Mon, Oct 15, 2012 at 08:18:36PM +0200, Jakov Sosic wrote:
 On 10/15/2012 07:23 PM, Stefan Schulte wrote:
 
  The fact that your exists? method does not really answer the question if
  a resource is present or absent is a bit strange. And inside the create
  method you are basically reimplementing properties with parameters. If
  something has to be checked for correctness it should be a property.
  Otherwise it is a parameter. Like the service resource: enable is a
  property because it can be out of sync. hasstatus is a parameter because
  it cannot be out of sync but only changes the behaviour of the provider
 
 OK, I've figured that out through this conversation...
 
 Now this is somewhat fixed code:
 
 http://pastebin.com/q0TBX4KB
 
 I've moved some params to properties.
 
 
  Your main concern against properties if I got you correctly was about
  speed because puppet would run one query for each property. One way around
  that is to implement a query method that will query all properties at once
  and store them in a hash (@property_hash). Every get-method now check
  if @property_hash[:some_property] does already exist and return that
  value if it does or run the query method that would populate the
  @property_hash hash.
 
 That sounds interesting, and more important it seems to me that complete
 rewrite is not necessary in this case. Do you have some examples of this
 idea?
 
 
  Another speed improvement is to implement an `instances` and `prefetch`
  method. That has the benefit that puppet does react on such methods
  if they are implemented:
  
  * you are able to run puppet resource cobblersystem on the command
line to get the current configuration of all systems (that depends on
an instances classmethod)
  * you can use the resources type to purge unmanaged systems
  
  resources { 'cobblersystem':
purge = true
  }
  * the prefetch method is automatically called by puppet if implemented
to create provider instances
  * your get methods become trivial
 
 Wow, sounds very interesting.
 
 I would plea for possible examples :)

The instances method is a class method and has to return an array of
providers. So this often looks like this

def self.instances
  systems = []
  my_fancy_command.each_line do |line|
somehow_split_line_into_different_fields_like_name_and_interfaces
systems  new(
  :name   = name,
  :interfaces = interfaces,
  :ensure = :present
)
  end
  systems
end

One important thing: If you create a new provider instance you can pass
a hash (like I did in new(:name = name, :interfaces = interface)) and
this hash is stored in the member variable @property_hash of that new
provider.

An example of a simple instances method:
https://github.com/stschulte/puppet-rpmkey/blob/master/lib/puppet/provider/rpmkey/rpm.rb

The rpmkey type can make sure that a certain gpg key is imported into
rpm. To get the currently installed keys the provider runs

rpm -q gpg-key

This command can either return with a non zero exit code (no packages
found) in case we have zero keys or it will print one line per key.
For each line a provider instance is added to the array that is finally
returned.

prefetch:
The prefetch method is called by puppet for each providerclass that
implements such a method (see lib/puppet/transaction.rb#prefetch). The
prefetch method is called with a hash of every resource that is defined
in the user's manifest (=every resource puppet should manage). The
hash will have the form resource[:name] as a key and resource as the
value. What the prefetch method can do now is create provider instances
and bind the provider instances to resources. A common prefetch method
that is also shown in the rpm provider for rpmkey:

def self.prefetch(resources)
  instances.each do |prov|
if resource = resources[prov.name]
  resource.provider = prov
end
  end
end

The prefetch method first calls instances that will return a list of
every key that is currently present. Then I check if that key is also
managed by puppet. If the lookup succeeds (the key is indeed managed by
puppet), I'll bind the provider to the resource. At this point the provider
instance already has @property_hash[:ensure] set, so when puppet later
handles the different rpmkey resources and asks exists? I can simply
return the cached value.

def exists?
  get(:ensure) != :absent
end

Note: get(:ensure) is implemented in lib/provider.rb as

def get(param)
  @property_hash[param.intern] || :absent
end

A more complex provider that has to manage multiple properties:
https://github.com/stschulte/puppetlabs-solaris/blob/feature/master/projects/lib/puppet/provider/project/projadd.rb

The instances method is more complicated here but it basically does the
same thing: return an array of provider instances. You'll notice that I
do not implement any method to get the 

Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Jakov Sosic
On 10/15/2012 11:44 PM, Stefan Schulte wrote:

 The instances method is a class method and has to return an array of
 providers. So this often looks like this
 
 def self.instances
   systems = []
   my_fancy_command.each_line do |line|
 somehow_split_line_into_different_fields_like_name_and_interfaces
 systems  new(
   :name   = name,
   :interfaces = interfaces,
   :ensure = :present
 )
   end
   systems
 end

Huh, so I have to build whole resources in self.instances, with all the
possible properties?


 This command can either return with a non zero exit code (no packages
 found) in case we have zero keys or it will print one line per key.
 For each line a provider instance is added to the array that is finally
 returned.

Got it from the upper code.


 I hope that helps. An example of a query method can be found in the
 package provider in puppet core. The package provider is a bit special
 here because it does not trust its prefetched values. This is because
 one resource can change the state of another resource:
 
 package { mod_ssl: ensure = installed }
 package { httpd: ensure = installed }
 
 The ensure property of httpd can change in the middle of a puppetrun (if
 mod_ssl is installed first httpd will be installed as a dependency)
 so the prefetched value of :absent can be obsolete when puppet actually
 handles the resource Package[httpd]. For you cobblersystem type I do
 not think that one resource may influence another resource right?

Yeah, you are right, one cobblersystem instance cannot influence
creation or modification of other instance.

But now that you mention, I do have one more question in this regard. Is
it possible for some property to create auto-require with some other
resource? Except from cobblersystem I do have 3 another custom types
(cobblerprofile, cobblerdistro and cobblerrepo). So, for example:

cobblerprofile { 'foo':
  ensure = present,
}
cobblersystem { 'bar':
  ensure  = present,
  profile = 'foo',
  require = Cobblerprofile['foo'],
}

Is there a way to skip the last require, and force it through profile
property in the type/provider code?


Thank you so much for the great explanation. I will save it and try to
code it first on my simpler types like cobblerprofile and if I succeed
will jump into fire and rewrite cobblersystem.

ty.

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



Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Nan Liu
On Mon, Oct 15, 2012 at 3:04 PM, Jakov Sosic jso...@srce.hr wrote:
 On 10/15/2012 11:44 PM, Stefan Schulte wrote:

 The instances method is a class method and has to return an array of
 providers. So this often looks like this

 def self.instances
   systems = []
   my_fancy_command.each_line do |line|
 somehow_split_line_into_different_fields_like_name_and_interfaces
 systems  new(
   :name   = name,
   :interfaces = interfaces,
   :ensure = :present
 )
   end
   systems
 end

 Huh, so I have to build whole resources in self.instances, with all the
 possible properties?


 This command can either return with a non zero exit code (no packages
 found) in case we have zero keys or it will print one line per key.
 For each line a provider instance is added to the array that is finally
 returned.

 Got it from the upper code.


 I hope that helps. An example of a query method can be found in the
 package provider in puppet core. The package provider is a bit special
 here because it does not trust its prefetched values. This is because
 one resource can change the state of another resource:

 package { mod_ssl: ensure = installed }
 package { httpd: ensure = installed }

 The ensure property of httpd can change in the middle of a puppetrun (if
 mod_ssl is installed first httpd will be installed as a dependency)
 so the prefetched value of :absent can be obsolete when puppet actually
 handles the resource Package[httpd]. For you cobblersystem type I do
 not think that one resource may influence another resource right?

 Yeah, you are right, one cobblersystem instance cannot influence
 creation or modification of other instance.

 But now that you mention, I do have one more question in this regard. Is
 it possible for some property to create auto-require with some other
 resource? Except from cobblersystem I do have 3 another custom types
 (cobblerprofile, cobblerdistro and cobblerrepo). So, for example:

 cobblerprofile { 'foo':
   ensure = present,
 }
 cobblersystem { 'bar':
   ensure  = present,
   profile = 'foo',
   require = Cobblerprofile['foo'],
 }

 Is there a way to skip the last require, and force it through profile
 property in the type/provider code?

Since you already specify the profile, in your cobblersystem resource
type add autorequire.

autorequire(:cobblerprofile) do
  self[:profile]
end

Thanks,

Nan

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



[Puppet Users] Re: Puppet not picking up files

2012-10-15 Thread Dan
You're a start. Many thanks for that.

Much appreciated.

Dan

On Monday, October 15, 2012 9:58:14 PM UTC+1, Dan wrote:

 Hi 

 I largely copied the example in 
 http://docs.puppetlabs.com/learning/modules1.html. But I'm getting an 
 error when running the following from the client:

 puppet agent --server puppetmaster --waitforcert 60 --test
 err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not 
 retrieve information from environment production source(s) 
 file:/etc/puppet/modules/ntp/files/ntp.conf at 
 /etc/puppet/modules/ntp/manifests/init.pp:28

 on the puppet server I have the following:

 # init.pp

 class ntp {
   case $operatingsystem {
 sles: {
   $service_name = 'ntpd'
   $conf_file= 'ntp.conf'
 }
   }

 #  package { 'ntp':
 #ensure = installed,
 #  }

   service { 'ntp':
 name  = $service_name,
 ensure= running,
 enable= true,
 subscribe = File['ntp.conf'],
   }

   file { 'ntp.conf':
 path= '/etc/ntp/ntp.conf',
 ensure  = file,
 #require = Package['ntp'],
 #   source   = puppet:///modules/ntp/files/${conf_file},
 source   = /etc/puppet/modules/ntp/files/${conf_file},
   }
 }


 Furhter info from puppet server:

 puppet apply --configprint:
 /etc/puppet/modules:/usr/share/puppet/modules
 pluginsource = puppet://puppet/plugins
 pluginsync = false


 Can someone please help me please, as I'm lost with this error?

 Thanks in advance
 Dan




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



[Puppet Users] Puppet 3.0.0 bugs fixed in 3.0.1

2012-10-15 Thread Eric Sorenson
Hi, Matthaus posted a link to the RC of Puppet 3.0.1 last week[1] but it 
might have gotten missed over the weekend. I wanted to follow up to call 
out some specific fixes in the release that the early adopters ran into and 
reported (for which: THANK YOU!!).

First, the problem with `puppet kick` not working is fixed[2].  You will 
still see a deprecation warning, which is intentional, but 'kick' should 
function normally again. 

The issue Chris Mague and others ran into where the ENC script stopped 
being consulted when stored configs was on[3] is also fixed, and through 
the process of testing and fixing it, Andy Parker and Josh Cooper added 
acceptance tests around this functionality so it won't regress on us in 
future.

Finally, Jeff Mccune tracked down the problem a number of people saw with 
header too long errors from Passenger[4]; turns out the error message was 
misleading and it was actually a non-existant header that caused the 
message. 

For full list of bugs fixed in 3.0.1, check 
out: http://projects.puppetlabs.com/versions/328

If you tried out 3.0.0 and had to roll back due to one of these bugs please 
give it another go.

Eric Sorenson - eric.soren...@puppetlabs.com
#puppet irc: eric0

[1] https://groups.google.com/d/topic/puppet-users/Jrr5v-Fj-88/discussion
[2] http://projects.puppetlabs.com/issues/15717
[3] http://projects.puppetlabs.com/issues/16698
[4] http://projects.puppetlabs.com/issues/16769

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread Tim Mooney

In regard to: [Puppet Users] Re: The free software tarballs are now...:


The Products - Puppet Open Source link on the main page takes you here:

http://puppetlabs.com/puppet/puppet-open-source/

where we promote getting the source from GitHub rather than tarballs
directly from us.

The reasoning has generally been that if you want to use Puppet, the best
way of consuming it is via packages, and if you want to get the source, the
best way of consuming it is via Git.


There are certainly some benefits to GitHub, but my recurring gripe is
that most software that's hosted on GitHub no longer seems to follow
any notion of versions or releases.  This makes packaging and local
version tracking a bit more tricky.

I see that you PuppetLabs folks are continuing to do a good job of tagging
release versions, though.  That's great news, and I certainly hope it
continues.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing  Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

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



Re: [Puppet Users] Create a variable variable

2012-10-15 Thread John Warburton
On 15 October 2012 23:12, rvlinden rene.vanderlinde...@gmail.com wrote:

 Hi all,

 I'm wondering if puppet can create a variable based on another variable ??
 Here is an example


A quick google of puppet variable variables found me
https://blog.kumina.nl/2010/09/puppet-tipstricks-variable-variables/

I've used the method described

John

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



Re: [Puppet Users] Re: Variables and autoloading

2012-10-15 Thread John Warburton
On 16 October 2012 01:03, jcbollinger john.bollin...@stjude.org wrote:

 In fact, in a reprise of my voice crying in the wilderness routine, I
 will urge you to avoid writing new parametrized classes for any


I hear you

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



Re: [Puppet Users] Re: The free software tarballs are now difficult to find

2012-10-15 Thread James Turnbull
On Monday, October 15, 2012 1:05:41 PM UTC-7, windowsrefund wrote:



 Look, don't start trying to paint me in a negative light here. I'm not the 
 one who has taken specific actions designed to alienate the free software 
 community. Let's get back to the topic at hand. Someone obviously made the 
 decision to make the community jump through yet another hoop in order to 
 obtain and therefore, use, the free software version over PE. Who made that 
 decision and how was that justified? More importantly, who is making the 
 call to not revert the page now that objections have been raised?



Adam

Firstly, we're not going to revisit the discussions around the change of 
Puppet and Facter's license. We stated our reasoning at that time (see this 
blog post - http://puppetlabs.com/blog/relicensing-puppet-to-apache-2-0/). 
We accept that some members of the community (a very small number from the 
feedback we've received) have an issue with the change but it has been 
largely well received.

Secondly, describing Puppet Lab's open source software as a red-headed 
step child is not only hyperbolic but it's also incorrect. We produce far 
more open source software than we do commercial software. The flurry of 
releases this year reflect this continued focus on the community and our 
commitment to open source software. 

Thirdly, as stated earlier, very few of our customers acquire the open 
source version of Puppet via the website. They use distribution provided 
packages or our own repositories. We agree we've removed the previously 
available bypass but we've also provided numerous other channels (that 
we've certainly not hidden from the community in any way) where you can get 
Puppet. 

Lastly, we freely admit that we're trying to feature Puppet Enterprise 
because it pays for us to continue to develop Puppet. That's our business 
model and we've been very clear now and in the past about that model and 
how commercial and open source software interact at Puppet Labs. As a 
result of our need to fund Puppet development we're clearly not going to 
meet the expectations of every member of the community but we've chosen a 
path we think, and feedback from the community reflects this, delivers to 
the needs of both the open source community and allows us to maintain a 
viable business.

Kind Regards

James Turnbull

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



Re: [Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-15 Thread Nick Fagerlund


On Monday, October 15, 2012 1:45:12 PM UTC-7, jcbollinger wrote:


 Indeed, I have taken a second look, and a third, and maybe more.  I love 
 the hiera integration with parametrized classes.  It was a fabulous idea, 
 as it makes it reasonable and safe to use existing parametrized classes 
 (provided you use only 'include' or 'require' to declare them).

 Even with that, however, parametrized classes offer very little of value 
 over non-parametrized analogs that implement the same hiera-based external 
 data access.  One could argue, perhaps, that there is a documentary 
 advantage in parametrization, but I think that's poor justification for 
 introducing functional (so to speak) elements to any class.  That's what 
 comments are for.


But parameters expose that info to more than humans -- for example, you can 
use the resource_type REST endpoint today to get a list of all classes and 
their parameters and defaults. Not a lot is using that today, but I expect 
more and more things to start doing auto-discovery of parameters, since 
it's a really machine-friendly way to find out what a class wants.

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



[Puppet Users] bootup/shutdown sequence

2012-10-15 Thread Stuart Cracraft

Is there a single script or tool which calls all the puppetrelated 
startup/shutdown rc scripts in the prescribed order as they currently exist on 
the box?

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