[Puppet Users] Re: question with puppet

2012-11-13 Thread Drew Michel
You can read all about the puppet file server here.
http://docs.puppetlabs.com/guides/file_serving.html


On Wednesday, November 7, 2012 11:54:36 AM UTC-5, bobby38 wrote:
>
> I have added a new folder to my /modules/backup called files 
> /modules/backup/files
> i have verified the new files folder resides in puppet master and owned by 
> puppet and it has the right permission
> when i source to the a file inside file folder
>
>  source => "puppet:///backup/files/foo", 
>
> i am getting the below error mesage
>  Could not evaluate: Could not retrieve information from environment  
> source(s) puppet:///backup/files/foo
>
> any suggestion?
> Thanks
>

-- 
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/-/wVNdd_2WhKgJ.
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: 400 permission denied error

2012-11-13 Thread Drew Michel
Is /etc/puppet/auth.conf  owned by the puppet process? You could also try 
setting it as world readable.

And make sure in your puppet.conf under the agent stanza, the server block 
is set to the domain name of the puppet master. You should be able to 
telnet to it on port 8140.

[agent]
server = puppet.localhost


On Tuesday, November 13, 2012 3:55:44 PM UTC-5, frap wrote:
>
> I'm just getting started with puppet and there's something I can't get 
> working. I have a client/agent setup at the moment.
>
> When running puppet agent for the first time, I get the following error:
>
>  puppet agent --test
> dnsdomainname: Unknown host
> Error: Could not request certificate: Error 400 on SERVER: Permission 
> denied - /etc/puppet/auth.conf
>
> My auth.conf looks like this, which I believe is how it is out of the box.
>
> # allow nodes to retrieve their own catalog (ie their configuration)
> path ~ ^/catalog/([^/]+)$
> method find
> allow $1
>
> # allow all nodes to access the certificates services
> path /certificate_revocation_list/ca
> method find
> allow *
>
> # allow all nodes to store their reports
> path /report
> method save
> allow *
>
> # inconditionnally allow access to all files services
> # which means in practice that fileserver.conf will
> # still be used
> path /file
> allow *
>
> ### Unauthenticated ACL, for clients for which the current master doesn't
> ### have a valid certificate
>
> # allow access to the master CA
> path /certificate/ca
> auth no
> method find
> allow *
>
> path /certificate/
> auth no
> method find
> allow *
>
> path /certificate_request
> auth no
> method find, save
> allow *
>
> # this one is not stricly necessary, but it has the merit
> # to show the default policy which is deny everything else
> path /
> auth any
>
> SElinux is off and all firewall ports are open. Can anyone help?
>
>

-- 
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/-/W3BCpKJzzc8J.
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 in SW MO

2012-11-13 Thread Luke Baker
I'm in Columbia so not exactly in the Springfield area but still in MO : )

On Tuesday, November 6, 2012 8:17:56 AM UTC-6, llowder wrote:
>
> i am currently located in southwest MIssouri. Springfield, MO to be 
> precise.
>
> I'd like to get some sort of Puppet user group / meetup going in the area, 
> but so far have not been able to locate anyone. I had looked on some of the 
> Springfield based DevOps and related LInkedIn groups, but got no response, 
> so I figured I'd ask here.
>
> Anyone in the SW MO area and interested in something like this?
>
> Thanks
>

-- 
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/-/ZNZOyk05oF0J.
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] parse puppet file url in customized functions?

2012-11-13 Thread woosley. xu.
Thanks Jeff,
I copy-pasted the code and it just worked.  Here is my function:




require 'uri'
module Puppet::Parser::Functions

newfunction(:loadyaml, :doc => <<-'ENDHEREDOC') do |args|
Load a YAML file containing a hash, set the hash values.
Support puppet urls

For example:
loadyaml('/etc/puppet/data/myhash.yaml')
loadyaml('puppet:///modules/name/myhash.yaml')
ENDHEREDOC

unless args.length == 1
raise Puppet::ParseError, ("loadyaml(): wrong number of
arguments (#{args.length}; must be 1)")
end

params = nil
path = args[0]
unless Puppet::Util.absolute_path?(path)
uri = URI.parse(URI.escape(path))
raise Puppet::ParseError, ("Cannot use relative URLs
'#{path}'") unless uri.absolute?
raise Puppet::ParseError, ("Cannot use opaque URLs
'#{path}'") unless uri.hierarchical?
raise Puppet::ParseError, ("Cannot use URLs of type
'#{uri.scheme}' as source for fileserving") unless
%w{puppet}.include?(uri.scheme)
Puppet.info "loading parameters from #{path}"
content = Puppet::FileServing::Content.indirection.find(path)
params = YAML.load(content.content)
else
params = YAML.load_file(path)
end

params.each do |param, value|
setvar(param, value)
end
end
end


2012/11/14 Jeff McCune :
> On Tue, Nov 13, 2012 at 5:25 AM, woosley. xu.  wrote:
>> I am thinking about loading some paramters from a external file for my
>> souces.  Eg,
>>
>> class test {
>>
>> ## set parameters.
>> load_from_yaml("puppet:///modules/test/config.yaml")
>> }
>
> Ah, cool idea.  I think this would be a really valuable function to
> include in the stdlib [1] module.
>
> While it's very difficult to get the filesystem path, it seems like
> you really only need the contents of the file.  If you have a
> puppet:// URI, you can speak to the Puppet fileserve using the REST
> API to get the file contents.  This would avoid the need to read the
> file from disk yourself and it will work well even in multiple-master
> deployment scenarios since you're speaking to the API rather than to
> the underlying filesystem.
>
> The static compiler does just this.  It reads the contents of the file
> using the FileServer API in the store_content method:
> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/catalog/static_compiler.rb#L160-161
>
> You might be able to do something similar in your parser function.
> Given a URI, pass the string form to
> Puppet::FileServing::Content.indirection.find and you should get back
> a Ruby instance that models the file metadata and contains the
> content.
>
> Hope this helps,
> -Jeff
>
> [1] https://forge.puppetlabs.com/puppetlabs/stdlib
>
> --
> 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.
>



-- 
woosley.xu.http://twitter.com/redicaps

-- 
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: Not authorized to call find on /file_metadata, more issues?

2012-11-13 Thread Felipe Salum
I'm also having the same issue on the other locations. Not sure what's 
wrong since this is a default installation of puppet 3 with the original 
auth.conf

Error: /Stage[main]/Puppetdb::Master::Routes/File[/etc/puppet/routes.yaml]: 
Could not evaluate: Error 403 on SERVER: Forbidden request: 
puppet2.puppet.test(192.168.168.10) access to 
/file_metadata/modules/puppetdb/routes.yaml [find] at :102 Could not 
retrieve file metadata for puppet:///modules/puppetdb/routes.yaml: Error 
403 on SERVER: Forbidden request: puppet2.puppet.test(192.168.168.10) 
access to /file_metadata/modules/puppetdb/routes.yaml [find] at :102

Error: Could not retrieve catalog from remote server: Error 403 on SERVER: 
Forbidden request: puppet2.puppet.test(192.168.168.10) access to 
/catalog/puppet2.puppet.test [find] at :101
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Error: Could not send report: Error 403 on SERVER: Forbidden request: 
puppet2.puppet.test(192.168.168.10) access to /report/puppet2.puppet.test 
[save] at :102


Maybe it is a naming resolution issue ? I'm using /etc/hosts since this is 
a vagrant environment only for testing purposes.

If I start updating auth.conf to use 'auth no' everywhere it passes.

I don't see the problem on my production servers, so it worries me more :)

On Monday, November 12, 2012 4:27:41 PM UTC-8, Felipe Salum wrote:
>
> Hi Nick.
>
> Actually this is a new environment I'm setting up using vagrant, puppet 3 
> and the default auth.conf.
>
> I had to add allow_ip to the /reports request to make it work. Not sure 
> why but it sometimes fail when using the puppet server provider from 
> vagrant.
>
> Thanks,
> Felipe
>
> On Mon, Nov 12, 2012 at 4:22 PM, Nick Fagerlund <
> nick.fagerl...@puppetlabs.com> wrote:
>
>>
>>
>> On Saturday, November 10, 2012 5:43:48 PM UTC-8, Felipe Salum wrote:
>>>
>>> Is this related to the same error I have when I run the puppet agent on 
>>> my nodes ?
>>>
>> Nov 11 01:40:09 squeeze puppet-agent[8683]: Could not send report: Error 
>> 403 on SERVER: Forbidden request: puppetdb1.puppet.test(192.168.
>> **168.12) access to /report/puppetdb1.puppet.test [save] authenticated  
>> at :67
>>
>>
>> No, other than that they're both related to authentication in auth.conf. 
>> If you were upgrading from 2.6, note that the default value of the 'report' 
>> setting changed between 2.6 and 2.7: 
>>
>> http://docs.puppetlabs.com/references/2.7.latest/configuration.html#report
>> http://docs.puppetlabs.com/references/2.6.latest/configuration.html#report
>>
>> So if your auth.conf file doesn't allow authenticated nodes to send save 
>> requests to /report, you will get errors. Examine your auth.conf file and 
>> compare it to the one here: 
>>
>> https://github.com/puppetlabs/puppet/blob/master/conf/auth.conf
>>
>> You should have AT LEAST all the same rules, although your site may have 
>> some extra rules as well. Be aware that order matters in this file. 
>>
>> -- 
>> 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/-/rcFTBsu-IqkJ.
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/53V32bKqFYMJ.
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: sourceselect all

2012-11-13 Thread jcbollinger


On Tuesday, November 13, 2012 11:37:12 AM UTC-6, Bernardo Costa wrote:
>
> Ok John, it looks like sourceselect exists for handling files like the 
> ones under /etc/profile.d which is not the case for automount. Good to 
> know. About the options I have, I'd prefer not doing #1 for two reasons: 
> one is that many mountpoints would be duplicated toward many files as they 
> are common for all hosts or for a great number of them, and two is that I'd 
> like to reduce the number of different automount maps managed which makes 
> me avoid doing a one map for each host policy.



Let me be sure you understand that my suggestion (1) results in exactly one 
file being managed on each client, and it requires a per-node file on the 
master only for those nodes that require a file different from some 
standard one.  It is therefore a fairly good choice both when most of your 
nodes want the same mountpoints (because you need special-case files only 
for a few nodes), and at may be a good choice when most nodes are different 
-- even if there is a shared core of common mount points -- because you'll 
need special-case files for most nodes anyway.  Of course, you may be 
somewhere in between, or the suggestion may just not suit you.

 

> But the cost of doing things this way is managing hosts as a group of them 
> and having to treat the automount maps as incremental although it is not 
> like this.



I don't understand what you mean by that.  In particular, your use of 
"incremental" makes me suspect a misunderstanding: my option (1) does not 
involve concatenation of source files.  Puppet will sync the target file 
with the first file from its 'source' list that exists.  Thus, for those 
nodes that have a corresponding puppet:///files/automount/${hostname}.conf 
file, that file will be the source used, and for all other nodes 
puppet:///files/automount/basic.conf would be used instead.

 

> I think I have seen an example of #2 and just could make it work int this 
> way but I can't remember of having seen any example of #3. Is there any 
> advantage on trying way #3 ? If I do it, I believe I'll ne to install this 
> concat module. Where is it available ?
>


Option 3 (using the Concat module) makes the most sense if you are building 
the file from a relatively small number of possible blocks (each of which 
could define any number of mount points).  If your mount points fall into 
natural groups by role, location, department, or such then modeling them as 
file fragments via Concat might really clarify your manifests.

Alternatively, it might work out well to have the "basic" mount points in 
one static fragment, and everything else in one optional, template-built 
fragment.

On the other hand, although Concat is a useful module, it could be a lot 
heavier than you really need.  You'll need to decide for yourself whether 
it's worth it.  You should be able to find some talk about it in the 
archives of this group, and you can find the module itself on the Forge.


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/-/3c5I1Eo1CDgJ.
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: Pass Array as param to custom provider...

2012-11-13 Thread Nan Liu
On Tue, Nov 13, 2012 at 11:58 AM, fatmcgav  wrote:

> Looks like overriding the 'insync?' method is the way to go, as I'm only
> interested in checking/setting property values that are being passed
> through...
>
> Any insync? examples that I could refer to?
>

There's a simple example here:
https://github.com/puppetlabs/puppetlabs-f5/blob/master/lib/puppet/type/f5_virtualserver.rb#L13-15

Search puppet source code lib/puppet/type/ for additional ones.

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.



Re: [Puppet Users] Re: Newbie: puppetlabs-apache, modules and proxying

2012-11-13 Thread Jakov Sosic

On 11/13/2012 09:16 PM, jcbollinger wrote:


I see you've been paying attention.  :-)


Yeah because I tend to read all the mails on this list. From time to 
time my unread queue tends to grow over 500 messages, but as soon as I 
get some spare time I tend to shrink it back to zero. It's a nice way to 
get various ideas from other people, and avoid doing mistakes like 
defining parametrized classes as resources :) Or at least to be aware of 
the shortcomings of such approach.



I haven't actually been following this thread in any detail, but I would
like to point out that

   apache::mod { 'proxy_ajp': }

is the declaration of a /resource/ of type 'apache::mod', named
'proxy_ajp'.  Apache::mod is probably a defined type, though it could
also be a custom native type.  That's not at all the same thing as

   include apache::mod::proxy_ajp

which assigns a /class/ named 'apache::mod::proxy_ajp' to the node.  It
would be possible for the implementation of type apache::mod to make the
two statements substantially equivalent, but they are not inherently
so.  Either way, no parametrized-class syntax is involved.


Yeah, you're right... I'm using the same puppet module but like this:

...
  include apache::mod::status
  include apache::mod::proxy
  include apache::mod::proxy_http
...

so I didn't pay attention to details :)

Now that I look at apache module from puppetlabs, apache::mod is indeed 
defined type:


define apache::mod (
  $package = undef
) {
  $mod = $name
...
...
}



For the record, I have no objection to custom and defined types.


I know :)


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



[Puppet Users] 400 permission denied error

2012-11-13 Thread frap
I'm just getting started with puppet and there's something I can't get 
working. I have a client/agent setup at the moment.

When running puppet agent for the first time, I get the following error:

 puppet agent --test
dnsdomainname: Unknown host
Error: Could not request certificate: Error 400 on SERVER: Permission 
denied - /etc/puppet/auth.conf

My auth.conf looks like this, which I believe is how it is out of the box.

# allow nodes to retrieve their own catalog (ie their configuration)
path ~ ^/catalog/([^/]+)$
method find
allow $1

# allow all nodes to access the certificates services
path /certificate_revocation_list/ca
method find
allow *

# allow all nodes to store their reports
path /report
method save
allow *

# inconditionnally allow access to all files services
# which means in practice that fileserver.conf will
# still be used
path /file
allow *

### Unauthenticated ACL, for clients for which the current master doesn't
### have a valid certificate

# allow access to the master CA
path /certificate/ca
auth no
method find
allow *

path /certificate/
auth no
method find
allow *

path /certificate_request
auth no
method find, save
allow *

# this one is not stricly necessary, but it has the merit
# to show the default policy which is deny everything else
path /
auth any

SElinux is off and all firewall ports are open. Can anyone help?

-- 
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/-/LP3GakjQKjIJ.
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] new puppet client not updating

2012-11-13 Thread JGonza1
Added new clients that are behind a firewall and none of them are updating 
with the configurations from the puppet master. I get the message below 
from the client when I run command puppet agent --server 
ct-eng-pup.caretools.ent --test. What ports need to be opened for client to 
talk to puppet master. The puppet client had no problem get aa certificate 
from the puppet client but it will not update.
 
info: Caching catalog for pdlnx-pntp02.kareoprod.ent
info: Applying configuration version '1351815499'
notice: Finished catalog run in 0.10 seconds
#
 
On the puppet master on the 
/var/lib/puppet/reports/pdlnx-pntp02.kareoprod.ent the transaction report I 
am getting a lot of failed, see log below.
--- !ruby/object:Puppet::Transaction::Report
  configuration_version: 1351815499
  environment: production
  host: pdlnx-pntp02.kareoprod.ent
  kind: apply
  logs:
- !ruby/object:Puppet::Util::Log
  level: !ruby/sym info
  message: Caching catalog for pdlnx-pntp02.kareoprod.ent
  source: Puppet
  tags:
- info
  time: 2012-11-13 12:23:01.849547 -08:00
- !ruby/object:Puppet::Util::Log
  level: !ruby/sym info
  message: Applying configuration version '1351815499'
  source: Puppet
  tags:
- info
  time: 2012-11-13 12:23:01.886192 -08:00
- !ruby/object:Puppet::Util::Log
  level: !ruby/sym notice
  message: Finished catalog run in 0.10 seconds
  source: Puppet
  tags:
- notice
  time: 2012-11-13 12:23:01.987541 -08:00
  metrics:
events: !ruby/object:Puppet::Util::Metric
  label: Events
  name: events
  values:
- - success
  - Success
  - 0
- - total
  - Total
  - 0
- - failure
  - Failure
  - 0
time: !ruby/object:Puppet::Util::Metric
  label: Time
  name: time
  values:
- - total
  - Total
  - 0.221700026885986
- - config_retrieval
  - Config retrieval
  - 0.221333026885986
- - filebucket
  - Filebucket
  - 0.000367
resources: !ruby/object:Puppet::Util::Metric
  label: Resources
  name: resources
  values:
- - changed
  - Changed
  - 0
- - failed_to_restart
  - Failed to restart
  - 0
- - restarted
  - Restarted
  - 0
- - total
  - Total
  - 7
- - out_of_sync
  - Out of sync
  - 0
- - failed
  - Failed
  - 0
- - skipped
  - Skipped
  - 6
- - scheduled
  - Scheduled
  - 0
changes: !ruby/object:Puppet::Util::Metric
  label: Changes
  name: changes
  values:
- - total
  - Total
  - 0
  puppet_version: 2.7.19
  report_format: 2
  resource_statuses:
"Filebucket[puppet]": !ruby/object:Puppet::Resource::Status
  change_count: 0
  changed: false
  evaluation_time: 0.000367
  events: []
  failed: false
  file:
  line:
  out_of_sync: false
  out_of_sync_count: 0
  resource: "Filebucket[puppet]"
  resource_type: Filebucket
  skipped: false
  tags:
- filebucket
- puppet
  time: 2012-11-13 12:23:01.972617 -08:00
  title: puppet
"Schedule[weekly]": !ruby/object:Puppet::Resource::Status
  change_count: 0
  changed: false
  events: []
  failed: false

-- 
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/-/isBkWobXvv0J.
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 Community Metrics

2012-11-13 Thread Dawn Foster
Last month, we started publicly posting monthly community metrics
reports with all kinds of interesting information about the Puppet
Community. I also realized that I did a couple of blog posts about
this, but I had not posted it here on the mailing list for your
reading pleasure. The latest version of the metrics can be found here:
http://puppetlabs.com/community/metrics/

Here is a quick summary of the October edition of the metrics for your
reading pleasure, but you can also download the full October metrics
report: http://puppetlabs.com/wp-content/uploads/2012/10/Metrics-Oct-2012.pdf

October Metrics Summary:
4864 members and 1249 messages in Puppet-Users
899 members and 157 messages in Puppet-Dev
916 nicks on #puppet IRC channel
1731 Puppet Forge users and 577 modules
3526 Redmine accounts
399 forks / 1014 watchers of Puppet

Top 5 participants (by number of lines posted) in the #Puppet IRC channel:
* Volcane
* lavaman
* FriedBob
* fubada
* bubu\a

You can see the list of the top 20 people in the full report for October.

New this month, I’ve started gathering the top participants in each of
our community mailing lists. I am including the top 5 contributors in
the Puppet-Users mailing list, but you can see the full report for the
top users in Puppet-Dev and Puppet-Razor.

Top 5 participants (by number of messages / replies posted) in the
Puppet-Users list:
* jcbollinger
* Jeff McCune
* Josh Cooper
* Jakov Sosic
* Worker Bee

We’re also continuing to do a better job of merging code and keeping
the number of pull requests low in Puppet, at least compared to some
past months. We can always do a better job of more quickly merging
pull requests, but we’re continuing to work on improving this by
focusing some time on this activity. See October report for graph.

We also know that we have way too many outstanding issues in Redmine.
Many of these issues are in various limbo states, and they just need
people to go through and triage them. We’re working on a way to better
manage this process and make it easy for community contributors to
help with the triage process. We hope to have this ready in the next
couple of weeks. See October report for graph.

The full metrics report for October has several other charts that I
didn’t talk about here along with other details if you want to see
more: http://puppetlabs.com/wp-content/uploads/2012/10/Metrics-Oct-2012.pdf

This month, I added some new data for contributions to our mailing
lists, and I also hope to be adding additional details over the coming
months. If there is additional data you’d like to see, let me know,
and I’ll do what I can to get it included.

Thanks,
Dawn Foster

-- 
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: Newbie: puppetlabs-apache, modules and proxying

2012-11-13 Thread jcbollinger


On Monday, November 12, 2012 11:46:05 AM UTC-6, Jakov Sosic wrote:
>
> On 11/08/2012 06:05 PM, Hugo Rogg wrote: 
> > Meanwhile I figured out how to enable modules. 
> > In my case I added this to the node's config. 
> > 
> > apache::mod { 'proxy_ajp': } 
> > 
> > 
> > 
> > Can't believe this is not documented or that I might have missed it. 
>
> You can also do: 
>
> include apache::mod::proxy_ajp, which would be a much cleaner way. The 
> way you figured out is from parametrized classes and it is not the best 
> way to use it. I just hope jcbollinger didn't see it because he'll get 
> mad if he does :D 
>


I see you've been paying attention.  :-) 

I haven't actually been following this thread in any detail, but I would 
like to point out that

  apache::mod { 'proxy_ajp': } 

is the declaration of a *resource* of type 'apache::mod', named 
'proxy_ajp'.  Apache::mod is probably a defined type, though it could also 
be a custom native type.  That's not at all the same thing as

  include apache::mod::proxy_ajp

which assigns a *class* named 'apache::mod::proxy_ajp' to the node.  It 
would be possible for the implementation of type apache::mod to make the 
two statements substantially equivalent, but they are not inherently so.  
Either way, no parametrized-class syntax is involved.

For the record, I have no objection to custom and defined types.


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/-/alGGf4mthTQJ.
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: Pass Array as param to custom provider...

2012-11-13 Thread fatmcgav
Nan

Cheers again...

Looks like overriding the 'insync?' method is the way to go, as I'm only
interested in checking/setting property values that are being passed
through...

Any insync? examples that I could refer to?

Cheers
Gavin


On 13 November 2012 19:50, Nan Liu  wrote:

> On Tue, Nov 13, 2012 at 11:19 AM, Gavin Williams wrote:
>
>> After a quick google, came up with:
>>
>> #!/usr/bin/env ruby
>>>
>>> grades = { "Bob" => 82,
>>>"Jim" => 94,
>>>"Billy" => 58
>>>  }
>>>
>>> grades.each do|name,grade|
>>>   puts "#{name}: #{grade}"
>>> end
>>
>>
>> So now all I need to do is pull the existing options values and compile a
>> hash to compare in the exists?, and use the above in the create...
>
>
>
> Quick question on the create - how will it handle one property that
>> matches, but one property that doesn't?
>>
>
> You need a hash diff between current values and desired values and iterate
> through the difference. Hash properties are a bit more work, because the
> retrieve method may return more options than you care to set. You have the
> option to either munge and include default value to the user supplied
> value, or override insync? method so the comparison operation does not
> invoke option= method if the user specified value is a subset of the return
> hash from the option method.
>
> Alternatively if you only have a short number of options, you can just
> implement them as properties instead.
>
> 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.
>

-- 
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: Pass Array as param to custom provider...

2012-11-13 Thread Nan Liu
On Tue, Nov 13, 2012 at 11:19 AM, Gavin Williams  wrote:

> After a quick google, came up with:
>
> #!/usr/bin/env ruby
>>
>> grades = { "Bob" => 82,
>>"Jim" => 94,
>>"Billy" => 58
>>  }
>>
>> grades.each do|name,grade|
>>   puts "#{name}: #{grade}"
>> end
>
>
> So now all I need to do is pull the existing options values and compile a
> hash to compare in the exists?, and use the above in the create...



Quick question on the create - how will it handle one property that
> matches, but one property that doesn't?
>

You need a hash diff between current values and desired values and iterate
through the difference. Hash properties are a bit more work, because the
retrieve method may return more options than you care to set. You have the
option to either munge and include default value to the user supplied
value, or override insync? method so the comparison operation does not
invoke option= method if the user specified value is a subset of the return
hash from the option method.

Alternatively if you only have a short number of options, you can just
implement them as properties instead.

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: Initial run problems

2012-11-13 Thread Bret Wortman


On Tuesday, November 13, 2012 2:32:24 PM UTC-5, Bret Wortman wrote:
>
> I'm working on setting things up so that I can use Cobbler to kickstart a 
> basic system and then use Puppet to roll out the majority of packages based 
> on the role a particular system will be playing for us. I've got a 
> kickstarter file running (a thinly modified version of the Cobbler 
> sample.ks) but after it runs and installs around 444 packages including 
> puppet, I get this after booting into the system the first time (and after 
> doing the certificate exchange bit):
>
> # puppet agent -t
> Info: Retrieving plugin
> Timed out seeking value for ipaddress
> Timed out seeking value for ipaddress
> Error: Could not autoload puppet/provider/package/rpm: No child processes
> Error: Could not autoload puppet/type/package: Could not autlooad 
> puppet/provider/package/rpm: No child processes
> Error: Could not retrieve catalog from remote server: Could not intern 
> from pson: Could not autoload puppet/type/package: Could not autload 
> puppet/provider/package/rpm: No child processes
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog: skipping run
> #
>
> I've seen notes about ip addresses before, but I can ping, scp, and ssh 
> out of the box without issue (and can reach the puppet server, since we 
> performed the certificate request-sign-download thing).
>
> Any ideas?
>
> D'Oh. Solved this one myself via 

#chown <#> -R puppet:puppet /etc/puppet 

Not sure why the RPM package missed that, but it did. I'm adding a 
double-check to my kickstart for this.

-- 
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/-/HiyXirca4J4J.
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] Initial run problems

2012-11-13 Thread Bret Wortman
I'm working on setting things up so that I can use Cobbler to kickstart a 
basic system and then use Puppet to roll out the majority of packages based 
on the role a particular system will be playing for us. I've got a 
kickstarter file running (a thinly modified version of the Cobbler 
sample.ks) but after it runs and installs around 444 packages including 
puppet, I get this after booting into the system the first time (and after 
doing the certificate exchange bit):

# puppet agent -t
Info: Retrieving plugin
Timed out seeking value for ipaddress
Timed out seeking value for ipaddress
Error: Could not autoload puppet/provider/package/rpm: No child processes
Error: Could not autoload puppet/type/package: Could not autlooad 
puppet/provider/package/rpm: No child processes
Error: Could not retrieve catalog from remote server: Could not intern from 
pson: Could not autoload puppet/type/package: Could not autload 
puppet/provider/package/rpm: No child processes
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog: skipping run
#

I've seen notes about ip addresses before, but I can ping, scp, and ssh out 
of the box without issue (and can reach the puppet server, since we 
performed the certificate request-sign-download thing).

Any ideas?

-- 
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/-/7j53xwvS1LsJ.
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: Pass Array as param to custom provider...

2012-11-13 Thread Gavin Williams
After a quick google, came up with:

#!/usr/bin/env ruby
>
> grades = { "Bob" => 82,
>"Jim" => 94,
>"Billy" => 58
>  }
>
> grades.each do|name,grade|
>   puts "#{name}: #{grade}"
> end


So now all I need to do is pull the existing options values and compile a 
hash to compare in the exists?, and use the above in the create... 

Quick question on the create - how will it handle one property that 
matches, but one property that doesn't? 

Cheers
Gavin 

On Tuesday, 13 November 2012 19:04:31 UTC, Gavin Williams wrote:
>
> Nan 
>
> Cheers for the response. 
>
> Yes this is just a parameter... 
>
> What's the easiest way to work with them in the provider? 
>
> Cheers 
> Gavin 
> On Nov 13, 2012 7:00 PM, "Nan Liu"  wrote:
>
>> On Tue, Nov 13, 2012 at 7:33 AM, fatmcgav  wrote:
>>
>>> One of the functions required is the ability to set 'options' against a 
>>> given volume. 
>>> What I want to do is create a provider that accepts a volume name and a 
>>> list of volume options with their corresponding settings, and then iterate 
>>> through the provided list making a webservice call for each option. 
>>>
>>> So to give a better example of the provider in pastebin: 
>>> netapp_volume_options { 'v_puppet_test12111508':
>>> options => ['convert_ucode=on', 'no_atime_update=on'],
>>> }
>>>
>>
>> Yeah this seems to make more sense as a hash:
>>
>> options => { 'convert_ucode' => 'on', 'no_atime_update' => 'on' }
>>
>> I'm assuming this is just parameter, if it's a property add the following 
>> method to the type and you should get a reasonable output:
>>
>> def should_to_s(v)
>>   v.inspect
>> end
>>
>> def is_to_s(v)
>>   v.inspect
>> 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.
>>
>

-- 
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/-/mc453A4A648J.
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: rrdgraph issues

2012-11-13 Thread llowder


On Tuesday, November 13, 2012 12:41:38 PM UTC-6, Eric Sorenson wrote:
>
> use the attribute syntax in the config file, that way puppet won't clobber 
> it
>
> ## puppet.conf
> [main]
>rrddir = /var/lib/puppet/rrd { mode=0755 }
>
>
That was mentioned to me in IRC, and it did fix it.
 

> note this is currently not working under 3.0.1, tracking under #17371
>
 

>
> On Monday, November 12, 2012 7:54:57 AM UTC-8, llowder wrote:
>>
>> I recently enabled the rrdgraph reporting on my 2.7.19 master.
>>
>> I set it to create the graphs in /var/lib/puppet/rrd.
>>
>> In order to be able to access the things from the web, I set this 
>> directory to have mode 755.
>>
>> However, it keeps getting switched back to 750 during certain (all?) 
>> puppet runs.
>>
>> I then added the directory to one of my manifests to have puppet enforce 
>> the desired permissions. Now I keep seeing "mode changed '0750' to '0775'" 
>> for this resource.
>>
>> How can I make puppet stop fighting with itself and maintain the mode I 
>> want?
>>
>> I'm on Ubuntu 10.04, with my puppet installed from packages.
>>
>> 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/-/I5yZJFWV5-QJ.
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: Pass Array as param to custom provider...

2012-11-13 Thread fatmcgav
Nan

Cheers for the response.

Yes this is just a parameter...

What's the easiest way to work with them in the provider?

Cheers
Gavin
On Nov 13, 2012 7:00 PM, "Nan Liu"  wrote:

> On Tue, Nov 13, 2012 at 7:33 AM, fatmcgav  wrote:
>
>> One of the functions required is the ability to set 'options' against a
>> given volume.
>> What I want to do is create a provider that accepts a volume name and a
>> list of volume options with their corresponding settings, and then iterate
>> through the provided list making a webservice call for each option.
>>
>> So to give a better example of the provider in pastebin:
>> netapp_volume_options { 'v_puppet_test12111508':
>> options => ['convert_ucode=on', 'no_atime_update=on'],
>> }
>>
>
> Yeah this seems to make more sense as a hash:
>
> options => { 'convert_ucode' => 'on', 'no_atime_update' => 'on' }
>
> I'm assuming this is just parameter, if it's a property add the following
> method to the type and you should get a reasonable output:
>
> def should_to_s(v)
>   v.inspect
> end
>
> def is_to_s(v)
>   v.inspect
> 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.
>

-- 
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] Couple of dashbaord issues

2012-11-13 Thread llowder


On Tuesday, November 13, 2012 12:41:58 PM UTC-6, Matthaus Litteken wrote:
>
> Which activerecord is in use on the master? Does anything appear in 
> the master logs? It looks like it's related to 
> https://projects.puppetlabs.com/issues/16376, which is fixed in the 
> current rc series for 2.7.20. 
>
>
I recently switched over to using puppetdb from storeconfigs, if that makes 
a difference.

I'm not sure which version of the activerecord is installed - there isn't a 
package or a system gem installed, so it's whatever is vendored by puppet 
(2.7.19) or dashboard (just upgraded from 1.2.10 to 1.2.12)

As for the logs, I could not find anything in:
/var/log/apache2/error.log
/var/log/puppet/*
/var/log/puppet-dashboard/*

I am running my puppet master via Apache + passenger, but Dashboard via 
webrick.

Looking at that ticket, I think it may be the problem with the inventory 
issue, though there is still the filebucket issue to address.
 

> On Tue, Nov 13, 2012 at 8:18 AM, llowder > 
> wrote: 
> > I'm running dashbaord 1.2.12 on Ubuntu 10.04, with puppet 2.7.19 
> > 
> > When I try to do an inventory search, I just get a blank screen. 
> > 
> > When I try to view a changed file, I get a white box w/ "i/o error". 
> > 
> > I have asked about this once before in IRC, and the fix involved using a 
> > backported package, which I was unable to do at the time. Unfortunately, 
> I 
> > am unable to recall the version or the package(s) needed. 
> > 
> > Can someone please let me know how to fix these issues? 
> > 
> > (non-vendored) gem list: 
> > 
> > bundler (1.1.4) 
> > diff-lcs (1.1.3) 
> > gorgeous (0.1.2) 
> > gpgme (2.0.1) 
> > hiera (1.1.0) 
> > hiera-gpg (1.1.0) 
> > hiera-puppet (1.0.0) 
> > json (1.5.4) 
> > metaclass (0.0.1) 
> > mocha (0.12.1) 
> > puppet-lint (0.3.2) 
> > puppetlabs_spec_helper (0.2.0) 
> > rack (1.1.2) 
> > rake (0.9.2.2) 
> > rdoc (3.11) 
> > rspec (2.11.0) 
> > rspec-core (2.11.1) 
> > rspec-expectations (2.11.2) 
> > rspec-mocks (2.11.1) 
> > rspec-puppet (0.1.3) 
> > 
> > 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/-/0Pr5Kw0OaeEJ. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/puppet-users?hl=en. 
>
>
>
> -- 
> Matthaus Owens 
> Release Manager, 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/-/HPAzArbIr_8J.
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: Pass Array as param to custom provider...

2012-11-13 Thread Nan Liu
On Tue, Nov 13, 2012 at 7:33 AM, fatmcgav  wrote:

> One of the functions required is the ability to set 'options' against a
> given volume.
> What I want to do is create a provider that accepts a volume name and a
> list of volume options with their corresponding settings, and then iterate
> through the provided list making a webservice call for each option.
>
> So to give a better example of the provider in pastebin:
> netapp_volume_options { 'v_puppet_test12111508':
> options => ['convert_ucode=on', 'no_atime_update=on'],
> }
>

Yeah this seems to make more sense as a hash:

options => { 'convert_ucode' => 'on', 'no_atime_update' => 'on' }

I'm assuming this is just parameter, if it's a property add the following
method to the type and you should get a reasonable output:

def should_to_s(v)
  v.inspect
end

def is_to_s(v)
  v.inspect
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.



Re: [Puppet Users] Couple of dashbaord issues

2012-11-13 Thread Matthaus Owens
Which activerecord is in use on the master? Does anything appear in
the master logs? It looks like it's related to
https://projects.puppetlabs.com/issues/16376, which is fixed in the
current rc series for 2.7.20.

On Tue, Nov 13, 2012 at 8:18 AM, llowder  wrote:
> I'm running dashbaord 1.2.12 on Ubuntu 10.04, with puppet 2.7.19
>
> When I try to do an inventory search, I just get a blank screen.
>
> When I try to view a changed file, I get a white box w/ "i/o error".
>
> I have asked about this once before in IRC, and the fix involved using a
> backported package, which I was unable to do at the time. Unfortunately, I
> am unable to recall the version or the package(s) needed.
>
> Can someone please let me know how to fix these issues?
>
> (non-vendored) gem list:
>
> bundler (1.1.4)
> diff-lcs (1.1.3)
> gorgeous (0.1.2)
> gpgme (2.0.1)
> hiera (1.1.0)
> hiera-gpg (1.1.0)
> hiera-puppet (1.0.0)
> json (1.5.4)
> metaclass (0.0.1)
> mocha (0.12.1)
> puppet-lint (0.3.2)
> puppetlabs_spec_helper (0.2.0)
> rack (1.1.2)
> rake (0.9.2.2)
> rdoc (3.11)
> rspec (2.11.0)
> rspec-core (2.11.1)
> rspec-expectations (2.11.2)
> rspec-mocks (2.11.1)
> rspec-puppet (0.1.3)
>
> 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/-/0Pr5Kw0OaeEJ.
> 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.



-- 
Matthaus Owens
Release Manager, Puppet Labs

-- 
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: rrdgraph issues

2012-11-13 Thread Eric Sorenson
use the attribute syntax in the config file, that way puppet won't clobber 
it

## puppet.conf
[main]
   rrddir = /var/lib/puppet/rrd { mode=0755 }

note this is currently not working under 3.0.1, tracking under #17371

On Monday, November 12, 2012 7:54:57 AM UTC-8, llowder wrote:
>
> I recently enabled the rrdgraph reporting on my 2.7.19 master.
>
> I set it to create the graphs in /var/lib/puppet/rrd.
>
> In order to be able to access the things from the web, I set this 
> directory to have mode 755.
>
> However, it keeps getting switched back to 750 during certain (all?) 
> puppet runs.
>
> I then added the directory to one of my manifests to have puppet enforce 
> the desired permissions. Now I keep seeing "mode changed '0750' to '0775'" 
> for this resource.
>
> How can I make puppet stop fighting with itself and maintain the mode I 
> want?
>
> I'm on Ubuntu 10.04, with my puppet installed from packages.
>
> 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/-/abfYrPqtefwJ.
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] Test Active Directory sync module: lpep

2012-11-13 Thread new23d
Hi All

I have just published a module that synchronises users and groups from 
Active Directory into a Puppet manifest, which can then be rolled out to 
subscribed agents/workstations. The module maintains generated uids and 
gids in an SQLite database. It has only been tested on Puppet Enterprise 
2.6.1 and RHEL 6.3 so far, at my end.

The module is called lpep and you can view it at 
http://forge.puppetlabs.com/new23d/lpep

It would be great if I can find some users who would be interested in 
testing this module! For your reference, I am copying the contents of its 
README file here.



lpep

LDAP passwd Enumerator for Puppet

Purpose
---
Add users and groups from Active Directory to your Red Hat 6.x compatible 
systems

License
---
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License

Setup
-
On Red Hat 6.x compatible systems:

(1) command: yum install pam_ldap
(2) command: authconfig --enableldapauth 
--ldapserver="ldap://ad.example.com"; --ldapbasedn="dc=example,dc=com" 
--updateall
(3) in /etc/pam_ldap.conf, add the following lines towards the end

binddn cn=foo,ou=bar,dc=example,dc=com
bindpw fubar
pam_login_attribute sAMAccountName

In the lpep module:

(1) edit manifests/lpep.ini to configure ldap settings
(2) ensure bin/lpep.py is executable
(3) ensure manifests/lpep.pp , bin/lpep.db and bin/profiling.log are 
writable

Known Issues


(1) objects are tracked only by their username (or sAMAccountName) and not 
by SID, therefore if a username were to change, that would generate a new 
numeric uid
(2) objects are not removed from the target system's local user database, 
but if the ldap authentication were to fail, the user won't be able to 
login anyway
(3) limited to upto 1000 objects from active directory

Notes
-

(1) objects are stored in a local sqlite database, and the numeric uids and 
gids retained
(2) coded originally for domino ldap, therefore the routines may not be 
ideal for active directory



The module actually calls a Python script and is a bit of a hack. Apologies 
for that and I do intend to polish it up over time if the concept in which 
it tackles the problem gains acceptance, i.e. locally created users and 
groups with remote LDAP authentication.

Thanks
new23d

-- 
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/-/wd6zBzRnA1MJ.
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] parse puppet file url in customized functions?

2012-11-13 Thread Jeff McCune
On Tue, Nov 13, 2012 at 5:25 AM, woosley. xu.  wrote:
> I am thinking about loading some paramters from a external file for my
> souces.  Eg,
>
> class test {
>
> ## set parameters.
> load_from_yaml("puppet:///modules/test/config.yaml")
> }

Ah, cool idea.  I think this would be a really valuable function to
include in the stdlib [1] module.

While it's very difficult to get the filesystem path, it seems like
you really only need the contents of the file.  If you have a
puppet:// URI, you can speak to the Puppet fileserve using the REST
API to get the file contents.  This would avoid the need to read the
file from disk yourself and it will work well even in multiple-master
deployment scenarios since you're speaking to the API rather than to
the underlying filesystem.

The static compiler does just this.  It reads the contents of the file
using the FileServer API in the store_content method:
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/catalog/static_compiler.rb#L160-161

You might be able to do something similar in your parser function.
Given a URI, pass the string form to
Puppet::FileServing::Content.indirection.find and you should get back
a Ruby instance that models the file metadata and contains the
content.

Hope this helps,
-Jeff

[1] https://forge.puppetlabs.com/puppetlabs/stdlib

-- 
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: sourceselect all

2012-11-13 Thread Bernardo Costa
Ok John, it looks like sourceselect exists for handling files like the ones 
under /etc/profile.d which is not the case for automount. Good to know. 
About the options I have, I'd prefer not doing #1 for two reasons: one is 
that many mountpoints would be duplicated toward many files as they are 
common for all hosts or for a great number of them, and two is that I'd 
like to reduce the number of different automount maps managed which makes 
me avoid doing a one map for each host policy. But the cost of doing things 
this way is managing hosts as a group of them and having to treat the 
automount maps as incremental although it is not like this.
I think I have seen an example of #2 and just could make it work int this 
way but I can't remember of having seen any example of #3. Is there any 
advantage on trying way #3 ? If I do it, I believe I'll ne to install this 
concat module. Where is it available ?

Em terça-feira, 13 de novembro de 2012 12h45min43s UTC-2, jcbollinger 
escreveu:
>
>
>
> On Monday, November 12, 2012 1:00:14 PM UTC-6, Bernardo Costa wrote:
>>
>> I am using puppet-2.6.17 from a centos 5.x box and after reading the 
>> documentation (
>> http://docs.puppetlabs.com/references/2.6.17/type.html#file) I feel the 
>> need of using the sourceselect parameter set to all for 
>> copying/concatenating contents from multiple files to a single one. But it 
>> miserably fails on this issue. Below is an example of configuration I have 
>> tried without success. The idea is to create a base class for common 
>> contents of an automount map and also two specialized classes for 
>> particular mount points of each node. I believe with "sourceselect => all" 
>> it would be possible but I couldn't see it working. Any ideas of why ...?
>>
>
>
> The 'sourceselect' parameter doesn't do what you think it does.  It 
> applies only to File resources that manage directories recursively, where 
> it directs Puppet to combine the contents of all the specified 'source' 
> directories that exist.  Furthermore, "combine" in that case applies at the 
> level of identifying which files to manage, from which sources; it does not 
> produce concatenation under any circumstances.
>
>  
>
>>
>> File {
>> ensure => file,
>> group  => "root",
>> owner => "root",
>> mode  => "0644",
>> }
>>
>> class automount {
>> file { "/var/tmp/auto.direct": 
>> source => "puppet:///files/automount/basic.conf",
>> sourceselect => "all",
>> }   
>> }
>>  
>> class automount::itchy inherits automount {
>> File['/var/tmp/auto.direct'] { 
>> source => [ "puppet:///files/automount/itchy.conf", 
>> "puppet:///files/automount/basic.conf" ],
>> sourceselect => "all",
>> }   
>> }
>>
>> class automount::scratchy inherits automount { 
>> File['/var/tmp/auto.direct'] { 
>> source => [ "puppet:///files/automount/scratchy.conf", 
>> "puppet:///files/automount/basic.conf" ],
>> sourceselect => "all",
>> }   
>> }
>>
>> node default { 
>> include automount
>> }
>>  
>> node 'itchy' inherits default {
>> include automount::itchy
>> }
>>
>> node 'scratchy' inherits default {
>> include automount::scratchy
>> }
>>
>
>
> Some of your options are:
>
>1. Make puppet:///files/automount/scratchy.conf and the like complete 
>configuration files rather than supplemental file fragments
>2. Use 'content' instead of 'source', and create the content via the 
>template() function (even if only to perform the concatenation when you 
>want it)
>3. Use the Concat module to build your files from fragments where 
>needed (though this is really a wrapper around the above)
>
> Note that although option (1) will produce some duplication of your config 
> files, it could greatly simplify your manifests.  Consider:
>
> class automount {
>   file { "/var/tmp/auto.direct": 
> source => [
>   "puppet:///files/automount/${hostname}.conf",
>   'puppet:///files/automount/basic.conf"]
>   } 
> }
>
> No subclasses or special node blocks needed.
>
> In fairness, options (2) and (3) could also be written to avoid 
> subclassing and special node blocks, but not so simply and easily as it can 
> be done with option (1).
>
>
> 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/-/AHrhwrVJ0dYJ.
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 client won't autostart

2012-11-13 Thread Bret Wortman
On Tuesday, November 13, 2012 12:03:36 PM UTC-5, Michael Stanhke wrote:
>
> On Tue, Nov 13, 2012 at 8:31 AM, Bret Wortman 
> > 
> wrote: 
> > It is kind of funny that we're talking about using puppet's tricks for 
> > working around bad start scripts for puppet's own software 
> > 
> > 
> > On Tuesday, November 13, 2012 9:58:57 AM UTC-5, jcbollinger wrote: 
> >> 
> >> 
> >> 
> >> On Tuesday, November 13, 2012 7:40:08 AM UTC-6, Martin Alfke wrote: 
> >>> 
> >>> Hi Bret, 
> >>> 
> >>> On 13.11.2012, at 13:18, Bret Wortman wrote: 
> >>> 
> >>> I'm getting this problem on all the puppet client's I've been setting 
> up 
> >>> and it's got me both scratching my head (because I'm not seeing 
> anything 
> >>> obvious in any system logs) and pausing in my rollout until I get it 
> solved: 
> >>> 
> >>> # puppet resource service puppet ensure=running enable=true 
> >>> 
> >>> 
> >>> does the service script has a status option and does the status 
> deliver 
> >>> proper results? 
> >>> 
> >>> service puppet status 
> >>> 
> >>> Some service scripts do not check properly for the status or they 
> deliver 
> >>> wrong exit codes. 
> >>> If this is the case you can set 
> >>> hasstatus => false 
> >>> 
> >> 
> >> Or, better, fix the service script.  Note that Puppet cares only about 
> the 
> >> exit code; it ignores the output and error streams.  Be sure to check / 
> fix 
> >> the exit codes of all initscript actions, but especially "start", 
> "stop", 
> >> "status", and "restart" actions. 
> >> 
> >> 
> >> 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/-/4vZduFoHCrYJ. 
> > 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > puppet-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/puppet-users?hl=en. 
>
> Please try not to top post.  It makes following the conversation very 
> difficult. 
>
> For you, maybe. For old school guys like me, it's quite natural. But I'll 
try to force Google Groups to comply. ;-) 

>
> This is probably something to do with either 
>
> 1.  Puppet init script with systemd 
> 2.  Puppet's interaction with systemd. 
>
> Both are really new and honestly, I'm certain they're not bug free 
> yet.  If you could file a bug we'll look into this.  I've noticed the 
> issue too on one of my home systems and just haven't looked into it 
> yet. 
>

Will do, and I'm happy to help out in any way I can. I love the tool and 
appreciate your commitment to open source and community-supported versions. 
Thanks for your help!

>
>
> http://projects.puppetlabs.com/projects/puppet-community-pkg-repo/issues/new 
>

-- 
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/-/KP-SmJ1aW9MJ.
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 client won't autostart

2012-11-13 Thread Michael Stahnke
On Tue, Nov 13, 2012 at 8:31 AM, Bret Wortman  wrote:
> It is kind of funny that we're talking about using puppet's tricks for
> working around bad start scripts for puppet's own software
>
>
> On Tuesday, November 13, 2012 9:58:57 AM UTC-5, jcbollinger wrote:
>>
>>
>>
>> On Tuesday, November 13, 2012 7:40:08 AM UTC-6, Martin Alfke wrote:
>>>
>>> Hi Bret,
>>>
>>> On 13.11.2012, at 13:18, Bret Wortman wrote:
>>>
>>> I'm getting this problem on all the puppet client's I've been setting up
>>> and it's got me both scratching my head (because I'm not seeing anything
>>> obvious in any system logs) and pausing in my rollout until I get it solved:
>>>
>>> # puppet resource service puppet ensure=running enable=true
>>>
>>>
>>> does the service script has a status option and does the status deliver
>>> proper results?
>>>
>>> service puppet status
>>>
>>> Some service scripts do not check properly for the status or they deliver
>>> wrong exit codes.
>>> If this is the case you can set
>>> hasstatus => false
>>>
>>
>> Or, better, fix the service script.  Note that Puppet cares only about the
>> exit code; it ignores the output and error streams.  Be sure to check / fix
>> the exit codes of all initscript actions, but especially "start", "stop",
>> "status", and "restart" actions.
>>
>>
>> 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/-/4vZduFoHCrYJ.
>
> 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.

Please try not to top post.  It makes following the conversation very difficult.


This is probably something to do with either

1.  Puppet init script with systemd
2.  Puppet's interaction with systemd.

Both are really new and honestly, I'm certain they're not bug free
yet.  If you could file a bug we'll look into this.  I've noticed the
issue too on one of my home systems and just haven't looked into it
yet.

http://projects.puppetlabs.com/projects/puppet-community-pkg-repo/issues/new

-- 
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 client won't autostart

2012-11-13 Thread Bret Wortman
It is kind of funny that we're talking about using puppet's tricks for 
working around bad start scripts for puppet's own software


On Tuesday, November 13, 2012 9:58:57 AM UTC-5, jcbollinger wrote:
>
>
>
> On Tuesday, November 13, 2012 7:40:08 AM UTC-6, Martin Alfke wrote:
>>
>> Hi Bret,
>>
>> On 13.11.2012, at 13:18, Bret Wortman wrote:
>>
>> I'm getting this problem on all the puppet client's I've been setting up 
>> and it's got me both scratching my head (because I'm not seeing anything 
>> obvious in any system logs) and pausing in my rollout until I get it solved:
>>
>> # puppet resource service puppet ensure=running enable=true
>>
>>
>> does the service script has a status option and does the status deliver 
>> proper results?
>>
>> service puppet status
>>
>> Some service scripts do not check properly for the status or they deliver 
>> wrong exit codes.
>> If this is the case you can set
>> hasstatus => false
>>
>>
> Or, better, fix the service script.  Note that Puppet cares only about the 
> exit code; it ignores the output and error streams.  Be sure to check / fix 
> the exit codes of *all* initscript actions, but especially "start", 
> "stop", "status", and "restart" actions.
>
>
> 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/-/4vZduFoHCrYJ.
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 client won't autostart

2012-11-13 Thread Bret Wortman
This problem has continued through multiple reboots across multiple systems.

On Tuesday, November 13, 2012 9:47:03 AM UTC-5, Darin Perusich wrote:
>
> This is systemd weirdness. I've run into this error before on SuSE 
> with other init scripts and the fix was to reboot the machine. Then 
> you won't get the "Loaded: error (Reason: No such file or directory)" 
> anymore. 
>
> -- 
> Later, 
> Darin 
>
>
> On Tue, Nov 13, 2012 at 9:29 AM, Bret Wortman 
> > 
> wrote: 
> > It does not (and this is odd since I'm using F17): 
> > 
> > # service puppet status 
> > Redirecting to /bin/systemctl  status puppet.service 
> > puppet.service 
> >  Loaded: error (Reason: No such file or directory) 
> >  Active: inactive (dead) 
> > 
> > and yet ps still shows it running. 
> > 
> > But with your help, this at least starts it now, but I can't get the 
> > "ensure" bit working, and that's the really critical piece for us. Looks 
> > like Puppet is expecting to chkconfig this and that's not working. I 
> also 
> > have no file in /etc/init.d at all, so there's apparently no start 
> script on 
> > my system at all. I installed from the Puppetlabs repos. 
> > 
> > # puppet resource service puppet hasstatus=false ensure=running 
> enable=true 
> > Error: Could not enable puppet: Execution of '/sbin/chkconfig puppet on' 
> > returned 1: error reading information on service puppet: No such file or 
> > directory 
> > : 
> > : 
> > service { 'puppet': 
> >   ensure => running, 
> >   enable => false, 
> > } 
> > # 
> > 
> > On Tuesday, November 13, 2012 8:40:08 AM UTC-5, Martin Alfke wrote: 
> >> 
> >> Hi Bret, 
> >> 
> >> On 13.11.2012, at 13:18, Bret Wortman wrote: 
> >> 
> >> I'm getting this problem on all the puppet client's I've been setting 
> up 
> >> and it's got me both scratching my head (because I'm not seeing 
> anything 
> >> obvious in any system logs) and pausing in my rollout until I get it 
> solved: 
> >> 
> >> # puppet resource service puppet ensure=running enable=true 
> >> 
> >> 
> >> does the service script has a status option and does the status deliver 
> >> proper results? 
> >> 
> >> service puppet status 
> >> 
> >> Some service scripts do not check properly for the status or they 
> deliver 
> >> wrong exit codes. 
> >> If this is the case you can set 
> >> hasstatus => false 
> >> 
> >> hth, 
> >> 
> >> Martin 
> >> 
> >> Error: Could not start Service[puppet]: Execution of '/sbin/service 
> puppet 
> >> start' returned 1: 
> >> Error: /Service[puppet]/ensure: change from stopped to running failed: 
> >> Could not start Service[puppet]: Execution of '/sbin/service puppet 
> start' 
> >> returned 1: 
> >> service { 'puppet': 
> >>   ensure => 'stopped', 
> >>   enable => 'false', 
> >> } 
> >> # ps aux | grep 'puppet agent' | grep -v grep 
> >> # puppet agent 
> >> # ps aux | grep 'puppet agent' | grep -v grep 
> >> root 55055 12.4  0.1 383924 45928 ?   Ssl   07:150:01 
> >> /usr/bin/ruby /bin/puppet agent 
> >> # 
> >> 
> >> Where should I look first? I'm not sure why this will start for me 
> >> interactively but not from the agent (this also fails if the agent is 
> >> already running in exactly the same fashion). 
> >> 
> >> Thanks! 
> >> 
> >> 
> >> Bret Wortman 
> >> 
> >> -- 
> >> 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/-/Craxa7MPMXUJ. 
> >> To post to this group, send email to puppet...@googlegroups.com. 
> >> To unsubscribe from this group, send email to 
> >> puppet-users...@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 view this discussion on the web visit 
> > https://groups.google.com/d/msg/puppet-users/-/62Ns4IuyUJgJ. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > puppet-users...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/OXgaS9wEIQ0J.
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] Couple of dashbaord issues

2012-11-13 Thread llowder
I'm running dashbaord 1.2.12 on Ubuntu 10.04, with puppet 2.7.19

When I try to do an inventory search, I just get a blank screen.

When I try to view a changed file, I get a white box w/ "i/o error".

I have asked about this once before in IRC, and the fix involved using a 
backported package, which I was unable to do at the time. Unfortunately, I 
am unable to recall the version or the package(s) needed.

Can someone please let me know how to fix these issues? 

(non-vendored) gem list:

bundler (1.1.4)
diff-lcs (1.1.3)
gorgeous (0.1.2)
gpgme (2.0.1)
hiera (1.1.0)
hiera-gpg (1.1.0)
hiera-puppet (1.0.0)
json (1.5.4)
metaclass (0.0.1)
mocha (0.12.1)
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.2.0)
rack (1.1.2)
rake (0.9.2.2)
rdoc (3.11)
rspec (2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.2)
rspec-mocks (2.11.1)
rspec-puppet (0.1.3)

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/-/0Pr5Kw0OaeEJ.
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: Pass Array as param to custom provider...

2012-11-13 Thread fatmcgav
John

Cheers for the response.

As per my other threads, I'm writing a NetApp Network device module for
Puppet.

One of the functions required is the ability to set 'options' against a
given volume.
What I want to do is create a provider that accepts a volume name and a
list of volume options with their corresponding settings, and then iterate
through the provided list making a webservice call for each option.

So to give a better example of the provider in pastebin:
netapp_volume_options { 'v_puppet_test12111508':
options => ['convert_ucode=on', 'no_atime_update=on'],
}

Have just pushed my latest code to Github here:
https://github.com/fatmcgav/fatmcgav-netapp/tree/master/lib/puppet/provider/netapp_volume_options

I did manage to get it working after a bit of googling... However am happy
to take suggestions if there is a better method :)

Cheers
Gavin



On 13 November 2012 15:12, jcbollinger  wrote:

>
>
> On Tuesday, November 13, 2012 8:47:00 AM UTC-6, Gavin Williams wrote:
>>
>> Afternoon all
>>
>> Is it possible to pass an array of key=value pairs to a provider param,
>> and have the provider split and handle each key=value pair?
>>
>> Basically, I've defined a new provider and type as follows:
>> http://pastebin.com/WdekYPAh
>>
>
>
> I can't see your code because pastebin is blocked to me, but I may be able
> to give you some advice anyway:
>
>1. You can pass an array of key=value pairs as a parameter to a
>provider, and the provider can parse it any way you like.
>2. BUT you should not try to populate *other* parameters' values that
>way.  If you define a parameter that accepts a complex, structured value,
>then the entire value belongs to the parameter to which it is assigned.
>3. Wouldn't a hash be a better fit to the data than an array of
>key/value pairs anyway?
>
> What are you trying to achieve by this approach?  There is likely a better
> way.
>
>
> 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/-/yDOmbdqEY_sJ.
> 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: Pass Array as param to custom provider...

2012-11-13 Thread jcbollinger


On Tuesday, November 13, 2012 8:47:00 AM UTC-6, Gavin Williams wrote:
>
> Afternoon all
>
> Is it possible to pass an array of key=value pairs to a provider param, 
> and have the provider split and handle each key=value pair? 
>
> Basically, I've defined a new provider and type as follows: 
> http://pastebin.com/WdekYPAh
>


I can't see your code because pastebin is blocked to me, but I may be able 
to give you some advice anyway:

   1. You can pass an array of key=value pairs as a parameter to a 
   provider, and the provider can parse it any way you like.
   2. BUT you should not try to populate *other* parameters' values that 
   way.  If you define a parameter that accepts a complex, structured value, 
   then the entire value belongs to the parameter to which it is assigned.
   3. Wouldn't a hash be a better fit to the data than an array of 
   key/value pairs anyway?

What are you trying to achieve by this approach?  There is likely a better 
way.


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/-/yDOmbdqEY_sJ.
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 client won't autostart

2012-11-13 Thread jcbollinger


On Tuesday, November 13, 2012 7:40:08 AM UTC-6, Martin Alfke wrote:
>
> Hi Bret,
>
> On 13.11.2012, at 13:18, Bret Wortman wrote:
>
> I'm getting this problem on all the puppet client's I've been setting up 
> and it's got me both scratching my head (because I'm not seeing anything 
> obvious in any system logs) and pausing in my rollout until I get it solved:
>
> # puppet resource service puppet ensure=running enable=true
>
>
> does the service script has a status option and does the status deliver 
> proper results?
>
> service puppet status
>
> Some service scripts do not check properly for the status or they deliver 
> wrong exit codes.
> If this is the case you can set
> hasstatus => false
>
>
Or, better, fix the service script.  Note that Puppet cares only about the 
exit code; it ignores the output and error streams.  Be sure to check / fix 
the exit codes of *all* initscript actions, but especially "start", "stop", 
"status", and "restart" actions.


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/-/s3DERbSNhD4J.
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] Pass Array as param to custom provider...

2012-11-13 Thread Gavin Williams
Afternoon all

Is it possible to pass an array of key=value pairs to a provider param, and 
have the provider split and handle each key=value pair? 

Basically, I've defined a new provider and type as follows: 
http://pastebin.com/WdekYPAh

I've set '*:array_matching => all*' on the relevant newparam. 

However the puppet run is failing as follows:

Error: Could not set 'present' on ensure: $_ value need to be String (nil 
> given) at 48:/etc/puppet/manifests/site.pp
> Error: Could not set 'present' on ensure: $_ value need to be String (nil 
> given) at 48:/etc/puppet/manifests/site.pp
> Wrapped exception:
> $_ value need to be String (nil given)
> Error: 
> /Stage[main]//Node[actint-star-nactl01]/Netapp_volume_options[v_puppet_test12111508]/ensure:
>  
> change from absent to present failed: Could not set 'present' on ensure: $_ 
> value need to be String (nil given) at 48:/etc/puppet/manifests/site.pp
>

Debug logging shows:

>  ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: checking 
> value of Netapp Volume option on Volume v_puppet_test12111508
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: setting 
> Netapp Volume options against volume v_puppet_test12111508.
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Options: 
> x=ay=b
> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Option: x=a
>

So it looks to me like it's getting the values correctly, and its trying to 
iterate through each value.  

If I strip out the code on line 17-19, then the logs show the following 
additional line. The puppet run also completes without error. 

> ^[[0;36mDebug^[[0m: Puppet::Provider::netapp_volume_options: Option: y=b
>

So, any ideas???

Thanks in advance for any replies. 

Regards
Gavin  

-- 
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/-/neCIMOkh1JUJ.
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 client won't autostart

2012-11-13 Thread Darin Perusich
This is systemd weirdness. I've run into this error before on SuSE
with other init scripts and the fix was to reboot the machine. Then
you won't get the "Loaded: error (Reason: No such file or directory)"
anymore.

--
Later,
Darin


On Tue, Nov 13, 2012 at 9:29 AM, Bret Wortman  wrote:
> It does not (and this is odd since I'm using F17):
>
> # service puppet status
> Redirecting to /bin/systemctl  status puppet.service
> puppet.service
>  Loaded: error (Reason: No such file or directory)
>  Active: inactive (dead)
>
> and yet ps still shows it running.
>
> But with your help, this at least starts it now, but I can't get the
> "ensure" bit working, and that's the really critical piece for us. Looks
> like Puppet is expecting to chkconfig this and that's not working. I also
> have no file in /etc/init.d at all, so there's apparently no start script on
> my system at all. I installed from the Puppetlabs repos.
>
> # puppet resource service puppet hasstatus=false ensure=running enable=true
> Error: Could not enable puppet: Execution of '/sbin/chkconfig puppet on'
> returned 1: error reading information on service puppet: No such file or
> directory
> :
> :
> service { 'puppet':
>   ensure => running,
>   enable => false,
> }
> #
>
> On Tuesday, November 13, 2012 8:40:08 AM UTC-5, Martin Alfke wrote:
>>
>> Hi Bret,
>>
>> On 13.11.2012, at 13:18, Bret Wortman wrote:
>>
>> I'm getting this problem on all the puppet client's I've been setting up
>> and it's got me both scratching my head (because I'm not seeing anything
>> obvious in any system logs) and pausing in my rollout until I get it solved:
>>
>> # puppet resource service puppet ensure=running enable=true
>>
>>
>> does the service script has a status option and does the status deliver
>> proper results?
>>
>> service puppet status
>>
>> Some service scripts do not check properly for the status or they deliver
>> wrong exit codes.
>> If this is the case you can set
>> hasstatus => false
>>
>> hth,
>>
>> Martin
>>
>> Error: Could not start Service[puppet]: Execution of '/sbin/service puppet
>> start' returned 1:
>> Error: /Service[puppet]/ensure: change from stopped to running failed:
>> Could not start Service[puppet]: Execution of '/sbin/service puppet start'
>> returned 1:
>> service { 'puppet':
>>   ensure => 'stopped',
>>   enable => 'false',
>> }
>> # ps aux | grep 'puppet agent' | grep -v grep
>> # puppet agent
>> # ps aux | grep 'puppet agent' | grep -v grep
>> root 55055 12.4  0.1 383924 45928 ?   Ssl   07:150:01
>> /usr/bin/ruby /bin/puppet agent
>> #
>>
>> Where should I look first? I'm not sure why this will start for me
>> interactively but not from the agent (this also fails if the agent is
>> already running in exactly the same fashion).
>>
>> Thanks!
>>
>>
>> Bret Wortman
>>
>> --
>> 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/-/Craxa7MPMXUJ.
>> To post to this group, send email to puppet...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users...@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 view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/62Ns4IuyUJgJ.
> 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: sourceselect all

2012-11-13 Thread jcbollinger


On Monday, November 12, 2012 1:00:14 PM UTC-6, Bernardo Costa wrote:
>
> I am using puppet-2.6.17 from a centos 5.x box and after reading the 
> documentation (http://docs.puppetlabs.com/references/2.6.17/type.html#file) 
> I feel the need of using the sourceselect parameter set to all for 
> copying/concatenating contents from multiple files to a single one. But it 
> miserably fails on this issue. Below is an example of configuration I have 
> tried without success. The idea is to create a base class for common 
> contents of an automount map and also two specialized classes for 
> particular mount points of each node. I believe with "sourceselect => all" 
> it would be possible but I couldn't see it working. Any ideas of why ...?
>


The 'sourceselect' parameter doesn't do what you think it does.  It applies 
only to File resources that manage directories recursively, where it 
directs Puppet to combine the contents of all the specified 'source' 
directories that exist.  Furthermore, "combine" in that case applies at the 
level of identifying which files to manage, from which sources; it does not 
produce concatenation under any circumstances.

 

>
> File {
> ensure => file,
> group  => "root",
> owner => "root",
> mode  => "0644",
> }
>
> class automount {
> file { "/var/tmp/auto.direct": 
> source => "puppet:///files/automount/basic.conf",
> sourceselect => "all",
> }   
> }
>  
> class automount::itchy inherits automount {
> File['/var/tmp/auto.direct'] { 
> source => [ "puppet:///files/automount/itchy.conf", 
> "puppet:///files/automount/basic.conf" ],
> sourceselect => "all",
> }   
> }
>
> class automount::scratchy inherits automount { 
> File['/var/tmp/auto.direct'] { 
> source => [ "puppet:///files/automount/scratchy.conf", 
> "puppet:///files/automount/basic.conf" ],
> sourceselect => "all",
> }   
> }
>
> node default { 
> include automount
> }
>  
> node 'itchy' inherits default {
> include automount::itchy
> }
>
> node 'scratchy' inherits default {
> include automount::scratchy
> }
>


Some of your options are:

   1. Make puppet:///files/automount/scratchy.conf and the like complete 
   configuration files rather than supplemental file fragments
   2. Use 'content' instead of 'source', and create the content via the 
   template() function (even if only to perform the concatenation when you 
   want it)
   3. Use the Concat module to build your files from fragments where needed 
   (though this is really a wrapper around the above)

Note that although option (1) will produce some duplication of your config 
files, it could greatly simplify your manifests.  Consider:

class automount {
  file { "/var/tmp/auto.direct": 
source => [
  "puppet:///files/automount/${hostname}.conf",
  'puppet:///files/automount/basic.conf"]
  } 
}

No subclasses or special node blocks needed.

In fairness, options (2) and (3) could also be written to avoid subclassing 
and special node blocks, but not so simply and easily as it can be done 
with option (1).


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/-/pKfjMXxPkvYJ.
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 client won't autostart

2012-11-13 Thread Bret Wortman
It does not (and this is odd since I'm using F17):

# service puppet status
Redirecting to /bin/systemctl  status puppet.service
puppet.service
 Loaded: error (Reason: No such file or directory)
 Active: inactive (dead)

and yet ps still shows it running.

But with your help, this at least starts it now, but I can't get the 
"ensure" bit working, and that's the really critical piece for us. Looks 
like Puppet is expecting to chkconfig this and that's not working. I also 
have no file in /etc/init.d at all, so there's apparently no start script 
on my system at all. I installed from the Puppetlabs repos.

# puppet resource service puppet hasstatus=false ensure=running enable=true
Error: Could not enable puppet: Execution of '/sbin/chkconfig puppet on' 
returned 1: error reading information on service puppet: No such file or 
directory
:
:
service { 'puppet':
  ensure => running,
  enable => false,
}
#

On Tuesday, November 13, 2012 8:40:08 AM UTC-5, Martin Alfke wrote:
>
> Hi Bret,
>
> On 13.11.2012, at 13:18, Bret Wortman wrote:
>
> I'm getting this problem on all the puppet client's I've been setting up 
> and it's got me both scratching my head (because I'm not seeing anything 
> obvious in any system logs) and pausing in my rollout until I get it solved:
>
> # puppet resource service puppet ensure=running enable=true
>
>
> does the service script has a status option and does the status deliver 
> proper results?
>
> service puppet status
>
> Some service scripts do not check properly for the status or they deliver 
> wrong exit codes.
> If this is the case you can set
> hasstatus => false
>
> hth,
>
> Martin
>
> Error: Could not start Service[puppet]: Execution of '/sbin/service puppet 
> start' returned 1:
> Error: /Service[puppet]/ensure: change from stopped to running failed: 
> Could not start Service[puppet]: Execution of '/sbin/service puppet start' 
> returned 1:
> service { 'puppet':
>   ensure => 'stopped',
>   enable => 'false',
> }
> # ps aux | grep 'puppet agent' | grep -v grep
> # puppet agent 
> # ps aux | grep 'puppet agent' | grep -v grep
> root 55055 12.4  0.1 383924 45928 ?   Ssl   07:150:01 
> /usr/bin/ruby /bin/puppet agent
> #
>
> Where should I look first? I'm not sure why this will start for me 
> interactively but not from the agent (this also fails if the agent is 
> already running in exactly the same fashion).
>
> Thanks!
>
>
> Bret Wortman
>
> -- 
> 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/-/Craxa7MPMXUJ.
> To post to this group, send email to puppet...@googlegroups.com
> .
> To unsubscribe from this group, send email to 
> puppet-users...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/62Ns4IuyUJgJ.
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: Overwriting a file provisioned by another module

2012-11-13 Thread jcbollinger


On Tuesday, November 13, 2012 3:18:36 AM UTC-6, Patxi Gortázar wrote:
>
> I'm a newbie and I might be missing something... but let me try to explain 
> what I want to accomplish and how I would like to do it. 
>
> I'm installing ssh by using the 
> saz::sshmodule. This module provision the 
> sshd_config file with the ssh 
> configuration. 
>
> I need to tune the sshd_config file, so I have a module, say 
> patxi::scstack that includes ssh and tries to overwrite the sshd_config by 
> defining this file again:
>
> class scstack_ssh {
>   include ssh
>
>   file { "/etc/ssh/sshd_config":
> content => template("scstack/sshd_config"),
>   }
> }
>
> This approach fails as expected:
>
> Duplicate declaration: File[/etc/ssh/sshd_config] is already declared in 
> file /tmp/vagrant-puppet/modules-0/ssh/manifests/server/config.pp at line 
> 11; cannot redeclare at 
> /tmp/vagrant-puppet/modules-0/scstack/manifests/scstack_ssh.pp:67
>
> The alternative could be to fork the module saz::ssh and change the 
> sshd_config file it provides to fit my needs. However, this seems odd to 
> me. I want to use the ssh puppet module as is, without any modification, so 
> as to be able to update this module if the original author makes changes to 
> it. In my humble opinion having to modify modules to fit my needs limits 
> reusing of puppet modules. 
>
> My question is: how can I achieve what I want? I see different options but 
> I would like to know how to do it "the puppet way":
>
>1. Modify the original ssh module to include my sshd_config file
>2. Modify the original ssh module to include a location parameter to 
>use as source ("puppet:///$location") for sshd (I don't know it parameters 
>can be used in place for puppet:// urls)
>3. Provision the file in my module using another name and do an exec 
>to rename it, overwriting the one generated by the ssh module
>4. ...Any other option?
>
>
Some modules accommodate local resource customization better than others, 
but are you certain that the module you are using does not already allow 
you to configure sshd as you would like?  If I were faced with that 
situation, *my* first inclination would be to look for a better module.  Is 
the module you're using really so inflexible, or are you trying to do 
something unusual?  What does the module's documentation have to say about 
it?

If you stick with the module you are using now, but it truly doesn't 
support your use case, then you have a few reasonably good options.  Of 
those you suggested, I rate (1) ok, and (2) borderline.  Option (3) is 100% 
awful -- don't go there.  You could also consider

  4. Create your own module containing a subclass of the appropriate class 
of the ssh module; in the subclass override the properties of 
File['/etc/ssh/sshd_config'] as you like.

That has the advantage of leaving the original module unchanged, but it is 
at least a bit messy.  It is a lot messy if the class declaring the target 
File is not part of the module's external interface.


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/-/S3lCQ7CS-IYJ.
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 client won't autostart

2012-11-13 Thread Martin Alfke
Hi Bret,

On 13.11.2012, at 13:18, Bret Wortman wrote:

> I'm getting this problem on all the puppet client's I've been setting up and 
> it's got me both scratching my head (because I'm not seeing anything obvious 
> in any system logs) and pausing in my rollout until I get it solved:
> 
> # puppet resource service puppet ensure=running enable=true

does the service script has a status option and does the status deliver proper 
results?

service puppet status

Some service scripts do not check properly for the status or they deliver wrong 
exit codes.
If this is the case you can set
hasstatus => false

hth,

Martin

> Error: Could not start Service[puppet]: Execution of '/sbin/service puppet 
> start' returned 1:
> Error: /Service[puppet]/ensure: change from stopped to running failed: Could 
> not start Service[puppet]: Execution of '/sbin/service puppet start' returned 
> 1:
> service { 'puppet':
>   ensure => 'stopped',
>   enable => 'false',
> }
> # ps aux | grep 'puppet agent' | grep -v grep
> # puppet agent 
> # ps aux | grep 'puppet agent' | grep -v grep
> root 55055 12.4  0.1 383924 45928 ?   Ssl   07:150:01 /usr/bin/ruby 
> /bin/puppet agent
> #
> 
> Where should I look first? I'm not sure why this will start for me 
> interactively but not from the agent (this also fails if the agent is already 
> running in exactly the same fashion).
> 
> Thanks!
> 
> 
> Bret Wortman
> 
> -- 
> 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/-/Craxa7MPMXUJ.
> 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] Puppet client won't autostart

2012-11-13 Thread Bret Wortman
I'm getting this problem on all the puppet client's I've been setting up 
and it's got me both scratching my head (because I'm not seeing anything 
obvious in any system logs) and pausing in my rollout until I get it solved:

# puppet resource service puppet ensure=running enable=true
Error: Could not start Service[puppet]: Execution of '/sbin/service puppet 
start' returned 1:
Error: /Service[puppet]/ensure: change from stopped to running failed: 
Could not start Service[puppet]: Execution of '/sbin/service puppet start' 
returned 1:
service { 'puppet':
  ensure => 'stopped',
  enable => 'false',
}
# ps aux | grep 'puppet agent' | grep -v grep
# puppet agent 
# ps aux | grep 'puppet agent' | grep -v grep
root 55055 12.4  0.1 383924 45928 ?   Ssl   07:150:01 /usr/bin/ruby 
/bin/puppet agent
#

Where should I look first? I'm not sure why this will start for me 
interactively but not from the agent (this also fails if the agent is 
already running in exactly the same fashion).

Thanks!


Bret Wortman

-- 
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/-/Craxa7MPMXUJ.
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] sourceselect all

2012-11-13 Thread Bernardo Costa
Martin, thank you for your prompt answer. As soon as I get this working 
I'll try to use modules instead of files. 
But anyway, trying to switch from "source =>" to "source +>" didn't make 
any difference even with "sourceselect => all". The example above still 
just fetches the first one listed in source attribute. Is it only available 
at some particular version of puppet maybe ?

File {
ensure => file,
group  => "root",
owner => "root",
mode  => "0644",
}

class automount {
file { "/var/tmp/auto.direct": 
sourceselect => all,
source => [ "puppet:///files/automount/basic.conf" ],
}   
}
 
class automount::itchy inherits automount {
File['/var/tmp/auto.direct'] { 
sourceselect => all,
source +> [ "puppet:///files/automount/itchy.conf", 
"puppet:///files/automount/basic.conf" ],
}   
}

class automount::scratchy inherits automount { 
File['/var/tmp/auto.direct'] { 
sourceselect => all,
source +> [ "puppet:///files/automount/scratchy.conf", 
"puppet:///files/automount/basic.conf" ],
}   
}

node default { 
include automount
}
 
node 'scratchy' inherits default {
include automount::scratchy
}

node 'itchy' inherits default {
include automount::itchy
}


Em terça-feira, 13 de novembro de 2012 06h12min17s UTC-2, Martin Alfke 
escreveu:
>
> Hi Bernardo, 
>
>
> On 12.11.2012, at 20:00, Bernardo Costa wrote: 
>
> > I am using puppet-2.6.17 from a centos 5.x box and after reading the 
> documentation (http://docs.puppetlabs.com/references/2.6.17/type.html#file) 
> I feel the need of using the sourceselect parameter set to all for 
> copying/concatenating contents from multiple files to a single one. But it 
> miserably fails on this issue. Below is an example of configuration I have 
> tried without success. The idea is to create a base class for common 
> contents of an automount map and also two specialized classes for 
> particular mount points of each node. I believe with "sourceselect => all" 
> it would be possible but I couldn't see it working. Any ideas of why ...? 
> > 
> > File { 
> > ensure => file, 
> > group  => "root", 
> > owner => "root", 
> > mode  => "0644", 
> > } 
> > 
> > class automount { 
> > file { "/var/tmp/auto.direct": 
> > source => "puppet:///files/automount/basic.conf", 
> > sourceselect => "all", 
> > }   
> > } 
> >   
> > class automount::itchy inherits automount { 
> > File['/var/tmp/auto.direct'] { 
> > source => [ "puppet:///files/automount/itchy.conf", 
> "puppet:///files/automount/basic.conf" ], 
> > sourceselect => "all", 
> > }   
> > } 
> > 
> you want to add the new sources in the inherited classes? 
>
> e.g. in automount::itchy 
>
> source +> ["puppet:///files/automount/itchy.conf", 
> "puppet:///files/automount/basic.conf"], 
>
> Sidenote: 
> when using modules the source has another syntax: 
>
> puppet:///modules// 
>
> you can omit the "files" path 
>
> HTH 
>
> Martin 
>
>
>

-- 
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/-/HEF7uUEdzFMJ.
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] Announce: Puppet-Dashboard 1.2.14 Available

2012-11-13 Thread shell heriyanto
Yes its also work for me. Just need to add some permission on some folder
in /usr/share/puppet-dashboard to make init.d file run


On Sat, Nov 10, 2012 at 4:46 AM, Moses Mendoza  wrote:

> On Fri, Nov 9, 2012 at 12:54 PM, Moses Mendoza 
> wrote:
> > On Fri, Nov 9, 2012 at 5:34 AM, Stefan Heijmans 
> wrote:
> >> el5 was not supported, as it has an dependency on ruby 1.8.7 and el5
> comes
> >> default with ruby 1.8.5.
> >> now that they deliver ruby 1.8.7 with puppet 3 for el5, they perhaps can
> >> also build them for el5.
> >
> > That is indeed true, you're right. So we did:) You should now be able
> > to `yum install puppet-dashboard` on el5 hosts from the Puppet Labs
> > yum repo, yum.puppetlabs.com. I also noticed dashboard wasn't quite
> > happy with the older rubygems in el5, so we built rubygems-1.3.7 for
> > el5 and added it to the dependencies repo on yum.puppetlabs.com as
> > well (el5 has rubygems-1.3.1, el6 has 1.3.7). Worked great for me.
>
> Just a side note to avoid confusion: rubygems-1.3.1 is in EPEL for
> el5, not core.
>
> > Enjoy.
> >
> > Moses
>
> --
> 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] parse puppet file url in customized functions?

2012-11-13 Thread woosley. xu.
I am thinking about loading some paramters from a external file for my 
souces.  Eg,

class test { 
 
## set parameters. 
load_from_yaml("puppet:///modules/test/config.yaml")
}

I already have a simple function which can load from the abspath 


module Puppet::Parser::Functions
  
newfunction(:load_from_yaml) do |args|

unless args.length == 1
raise Puppet::ParseError, ("loadyaml(): wrong number of 
arguments (#{args.length}; must be 1)")
end 
path = args[0]
raise Puppet::ParseError, ("path must be absolute") unless 
Puppet::Util.absolute_path?(path)
params = YAML.load_file(path)
params.each do |param, value|
setvar(param, value)
end
end 
end 


supporting  puppet url format would be a great help here. 


On Tuesday, November 13, 2012 4:48:15 AM UTC+8, Jeff McCune wrote:
>
> On Sat, Nov 10, 2012 at 9:22 AM, woosley. xu. 
> > wrote:
>
>> Hi all, 
>>I want to parse the puppet url in my customizes functions.  Eg, 
>> 
>>
>>  module Puppet::Parser::Functions
>>   newfunction(:load_file, ) do |arg|
>>path = get_real_path(arg[0])
>>load_file_content(path)
>>   end
>> end
>>
>>
>> suppose arg[0] is a puppet file url: 
>> puppt:///module/someModule/fileName.yaml, how can I parse this url and get 
>> the real os path of that file? 
>>
>>
> There isn't really a good and reliable way I can think of to do this. 
>  Functions are executed when a catalog is being compiled, but there is no 
> guarantee that the host compiling a catalog is also the same host that will 
> serve up file content and metadata.  In multiple-master configurations the 
> fileserver puppet master processes are often running on different hosts 
> than the catalog compiler puppet master processes.
>
> What problem are you trying to solve?  Perhaps there is another approach 
> that does not require translating Puppet URI's to real paths.
>
> -Jeff
>

-- 
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/-/5wxc6-yDDJkJ.
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] Overwriting a file provisioned by another module

2012-11-13 Thread Patxi Gortázar
I'm a newbie and I might be missing something... but let me try to explain 
what I want to accomplish and how I would like to do it. 

I'm installing ssh by using the saz::ssh 
module. This module provision the 
sshd_config file with the ssh 
configuration. 

I need to tune the sshd_config file, so I have a module, say patxi::scstack 
that includes ssh and tries to overwrite the sshd_config by defining this 
file again:

class scstack_ssh {
  include ssh

  file { "/etc/ssh/sshd_config":
content => template("scstack/sshd_config"),
  }
}

This approach fails as expected:

Duplicate declaration: File[/etc/ssh/sshd_config] is already declared in 
file /tmp/vagrant-puppet/modules-0/ssh/manifests/server/config.pp at line 
11; cannot redeclare at 
/tmp/vagrant-puppet/modules-0/scstack/manifests/scstack_ssh.pp:67

The alternative could be to fork the module saz::ssh and change the 
sshd_config file it provides to fit my needs. However, this seems odd to 
me. I want to use the ssh puppet module as is, without any modification, so 
as to be able to update this module if the original author makes changes to 
it. In my humble opinion having to modify modules to fit my needs limits 
reusing of puppet modules. 

My question is: how can I achieve what I want? I see different options but 
I would like to know how to do it "the puppet way":

   1. Modify the original ssh module to include my sshd_config file
   2. Modify the original ssh module to include a location parameter to use 
   as source ("puppet:///$location") for sshd (I don't know it parameters can 
   be used in place for puppet:// urls)
   3. Provision the file in my module using another name and do an exec to 
   rename it, overwriting the one generated by the ssh module
   4. ...Any other option?

Thanks in advance,
Patxi.

-- 
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/-/wriHqScyRNMJ.
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] sourceselect all

2012-11-13 Thread Martin Alfke
Hi Bernardo,


On 12.11.2012, at 20:00, Bernardo Costa wrote:

> I am using puppet-2.6.17 from a centos 5.x box and after reading the 
> documentation (http://docs.puppetlabs.com/references/2.6.17/type.html#file) I 
> feel the need of using the sourceselect parameter set to all for 
> copying/concatenating contents from multiple files to a single one. But it 
> miserably fails on this issue. Below is an example of configuration I have 
> tried without success. The idea is to create a base class for common contents 
> of an automount map and also two specialized classes for particular mount 
> points of each node. I believe with "sourceselect => all" it would be 
> possible but I couldn't see it working. Any ideas of why ...?
> 
> File {
> ensure => file,
> group  => "root",
> owner => "root",
> mode  => "0644",
> }
> 
> class automount {
> file { "/var/tmp/auto.direct": 
> source => "puppet:///files/automount/basic.conf",
> sourceselect => "all",
> }   
> }
>  
> class automount::itchy inherits automount {
> File['/var/tmp/auto.direct'] { 
> source => [ "puppet:///files/automount/itchy.conf", 
> "puppet:///files/automount/basic.conf" ],
> sourceselect => "all",
> }   
> }
> 
you want to add the new sources in the inherited classes?

e.g. in automount::itchy

source +> ["puppet:///files/automount/itchy.conf", 
"puppet:///files/automount/basic.conf"],

Sidenote:
when using modules the source has another syntax:

puppet:///modules//

you can omit the "files" path

HTH

Martin


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