Re: [Puppet Users] Re: puppet failing to run

2012-11-07 Thread Asif Iqbal
On Wed, Nov 7, 2012 at 9:51 PM, Asif Iqbal  wrote:

>
>
>
> On Wed, Nov 7, 2012 at 4:18 PM, Jeff McCune  wrote:
>
>> On Tue, Nov 6, 2012 at 7:08 PM, Asif Iqbal  wrote:
>>
>>> I did some clean up. Now I have only one version of puppet and facter.
>>
>>
>> It still seems like you could have stale files.
>>
>> Could you verify there are no stale files by pasting the output of this
>> command?
>>
>> ruby -r puppet -e 'puts %w{ puppet facter }.collect {|d|
>> $LOAD_PATH.collect {|l| { l => Dir["#{l}/#{d}/**.rb"] }}}.to_yaml'
>>
>
>
> http://paste.ubuntu.com/1341582/
>
>
yep, It does look like I have two different ruby

/usr/local/lib/site_ruby

and

/usr/lib/ruby

the /usr/local/ one does not match to any ubuntu apt. I can remove that if
necessary.



>
>> This will locate all of the puppet and facter libraries that are present
>> along the ruby load path.
>>
>> Thanks,
>> -Jeff
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> --
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
>
>


-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

-- 
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 failing to run

2012-11-07 Thread Asif Iqbal
On Wed, Nov 7, 2012 at 4:18 PM, Jeff McCune  wrote:

> On Tue, Nov 6, 2012 at 7:08 PM, Asif Iqbal  wrote:
>
>> I did some clean up. Now I have only one version of puppet and facter.
>
>
> It still seems like you could have stale files.
>
> Could you verify there are no stale files by pasting the output of this
> command?
>
> ruby -r puppet -e 'puts %w{ puppet facter }.collect {|d|
> $LOAD_PATH.collect {|l| { l => Dir["#{l}/#{d}/**.rb"] }}}.to_yaml'
>


http://paste.ubuntu.com/1341582/



> This will locate all of the puppet and facter libraries that are present
> along the ruby load path.
>
> Thanks,
> -Jeff
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

-- 
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: Strange Issue with Symlink

2012-11-07 Thread jbrown
Please disregard the original post. I found the issue.

I had the following incorrect require line in the link resource:
  require => [Mount["/mnt/${site_name}"], 
File["/var/www/${site_name}/${drupal_shared_reldir}"]],
It should be
  require => Mount["/mnt/${site_name}"],

Cheers,
Justin

On Wednesday, November 7, 2012 4:51:18 PM UTC-6, jbrown wrote:
>
> I'm seeing a strange issue with symlinks in Puppet 2.7.19. 
>   File {
> ensure   => directory,
> owner=> apache,
> group=> apache,
>   }
>
> file { "/mnt/${site_name}":
>   mode => 0660,
> }
>
> mount { "/mnt/${site_name}":
>   ensure => mounted,
>   atboot => true,
>   device => "${drupal_nfs_host}:${drupal_nfs_vol_root}",
>   fstype => "nfs",
>   options => "rw,vers=3,timeo=60,nosuid",
>   require => File["/mnt/${site_name}"],
> }
>
> file { "/var/www/${site_name}/${drupal_shared_reldir}":
>   ensure  => link,
>   target  => "/mnt/${site_name}",
>   require => [Mount["/mnt/${site_name}"], 
> File["/var/www/${site_name}/${drupal_shared_reldir}"]],
> }
>
> I run the agent on my node. The mount directory and mount point are setup 
> correctly. However, the symlink is completely ignored. (I've replaced 
> actual paths with the vars used above for privacy.)
>
> notice: /File[/mnt/${site_name}]/ensure: created
> notice: 
> /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]/ensure:
>  
> defined 'ensure' as 'mounted'
> info: FileBucket adding {md5}fa596fe1bd0cf2b5a3205e605b02a259
> info: 
> /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]: 
> Scheduling refresh of Mount[/mnt/${site_name}]
> info: Mount[/mnt/${site_name}](provider=parsed): Remounting
> notice: 
> /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]: 
> Triggered 'refresh' from 1 events
> info: 
> /Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]: 
> Scheduling refresh of Mount[/mnt/${site_name}]
> notice: Finished catalog run in 13.16 seconds
>
> As you can see, there were no messages related to 
> File["/var/www/${site_name}/${drupal_shared_reldir}"].
>
> The crazy part is that a test link does work.
>   file { "/tmp/test-link":
>   }
>
>   file { "/tmp/link":
> ensure => link,
> target => "/tmp/test-link",
> require => File["/tmp/test-link"],
>   }
>
> Any thoughts on what's happening? It seems odd that there are no error 
> messages.
>
> 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/-/qnR7CaJWracJ.
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] File header including timestamp

2012-11-07 Thread jcbollinger


On Wednesday, November 7, 2012 8:17:50 AM UTC-6, j4m3s wrote:
>
> Thank you very much Matt.  My searches hadn't turned that up - I was 
> searching on keywords relating to templates I think.
>
> Thanks again, James.
>
>
Do note that the reason that approach can work for cron jobs and hosts 
entries is that the relevant resources model individual parts of the file 
(one job or one host) rather than the file as a whole.  I imagine you could 
patch something together that would treat ordinary files as made up of 
parts, but it will probably need to be somewhat specific to the target file 
format.  I personally can't see doing that unless it were particularly 
important to have a content timestamp in the file.  I certainly don't see 
doing it routinely for every managed file.


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/-/XN7EX_wBe2EJ.
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: for i in array do something - iteration irritation

2012-11-07 Thread earthgecko
Hi John

Thanks, that will solve my immediate requirement.  Trying to keep it as 
puppet DSL and simple as possible.  However, I will check out the 
create_resources() function further.  Thanks for the pointers.

-- 
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/-/odb1kUCzNUUJ.
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] Strange Issue with Symlink

2012-11-07 Thread jbrown
I'm seeing a strange issue with symlinks in Puppet 2.7.19. 
  File {
ensure   => directory,
owner=> apache,
group=> apache,
  }

file { "/mnt/${site_name}":
  mode => 0660,
}

mount { "/mnt/${site_name}":
  ensure => mounted,
  atboot => true,
  device => "${drupal_nfs_host}:${drupal_nfs_vol_root}",
  fstype => "nfs",
  options => "rw,vers=3,timeo=60,nosuid",
  require => File["/mnt/${site_name}"],
}

file { "/var/www/${site_name}/${drupal_shared_reldir}":
  ensure  => link,
  target  => "/mnt/${site_name}",
  require => [Mount["/mnt/${site_name}"], 
File["/var/www/${site_name}/${drupal_shared_reldir}"]],
}

I run the agent on my node. The mount directory and mount point are setup 
correctly. However, the symlink is completely ignored. (I've replaced 
actual paths with the vars used above for privacy.)

notice: /File[/mnt/${site_name}]/ensure: created
notice: 
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]/ensure:
 
defined 'ensure' as 'mounted'
info: FileBucket adding {md5}fa596fe1bd0cf2b5a3205e605b02a259
info: 
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]: 
Scheduling refresh of Mount[/mnt/${site_name}]
info: Mount[/mnt/${site_name}](provider=parsed): Remounting
notice: 
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]: 
Triggered 'refresh' from 1 events
info: 
/Stage[main]//Node[NODE_NAME]/Market[${site_name}]/Mount[/mnt/${site_name}]: 
Scheduling refresh of Mount[/mnt/${site_name}]
notice: Finished catalog run in 13.16 seconds

As you can see, there were no messages related to 
File["/var/www/${site_name}/${drupal_shared_reldir}"].

The crazy part is that a test link does work.
  file { "/tmp/test-link":
  }

  file { "/tmp/link":
ensure => link,
target => "/tmp/test-link",
require => File["/tmp/test-link"],
  }

Any thoughts on what's happening? It seems odd that there are no error 
messages.

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/-/GN2ALLfkR7UJ.
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: for i in array do something - iteration irritation

2012-11-07 Thread jcbollinger


On Wednesday, November 7, 2012 3:15:15 PM UTC-6, earthgecko wrote:
>
> Hi
>
> I am sure that there is some way to iterate an array and do something for 
> each in.  It must be a wheel that has been invented (even if in a ruby 
> function)?
>
> I have needed to do something like this a few times now and I reckon 
> someone clever has already done it :)
>
> Using a normal bash type for loop as an example:
>
> app::thing { 'foo':
>   $config_templates = ['foo.conf', 'foo.more.conf']
> }
>
> define app::thing(
>   $config_templates = '',
> )  {
>   if $config_templates != '' {
> for i_config in $config_templates
> do
>   file { "/opt/app/thing/${name}/conf/${i_config}":
> content => template("app/${name}/conf_templates/${i_config}.erb"),
>   }
> done
>   }
> }
>
> Is there something in stdlib or forge to iterate an array and do something?
>


Puppet DSL cannot express iteration *per se*, but it can compactly express 
a set of resources that differ only in title.  In conjunction with defined 
types, that is usually sufficient for this kind of problem:

define app::thing::conffile ($thingname) {
  file { "/opt/app/thing/${thingname}/conf/${name}":
content => template("app/${thingname}/conf_templates/${name}.erb"),
  }
}

define app::thing ($config_templates = 'NONE') {
  if $config_templates != 'NONE' {
# creates multiple conf files if $config_templates
# is an array:
app::thing::conffile( $config_templates:
  thingname => $name
}
  }
}


If you need more flexibility than that then you may find the built-in 
create_resources() function useful to you.

For the ultimate in flexibility, you can always write your manifest in 
Puppet's Ruby DSL, which more or less makes it a dynamic 
manifest-generating script instead of an actual manifest.  In any case, it 
lets you use Ruby directly.


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/-/DAgGsFIZLqgJ.
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 creates a file even though an exec fails

2012-11-07 Thread Chris Hirsch
This example *may* be able to get me though this:

file{"/tmp/file1": content=>"file1"} ~> exec{ "/bin/false": refreshonly => 
true, notify  =>  Exec["file2"]} -> exec {"file2": command => "touch 
/tmp/file2", refreshonly => true }

of course I'll have to create the file though the file2 exec instead. 

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

2012-11-07 Thread Moses Mendoza
Puppet Dashboard 1.2.14 is a bugfix release of Puppet Dashboard.

This release is available for download at:
https://downloads.puppetlabs.com/dashboard/puppet-dashboard-1.2.14.tar.gz

Debian packages are available at https://apt.puppetlabs.com

RPM packages are available at https://yum.puppetlabs.com

See the Verifying Puppet Download section at:
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 1.2.14:
http://projects.puppetlabs.com/projects/dashboard

Documentation is available at:
http://docs.puppetlabs.com/dashboard/index.html

===
## Puppet Dashboard 1.2.14 Bug Fixes ##
===

An error in the packaging of Puppet Dashboard 1.2.13 resulted in
several empty directories normally shipped with Puppet Dashboard
getting excluded from the source tarball and packages, e.g. 'tmp',
'log', and 'spool'. This release is a re-packaging of Puppet Dashboard
1.2.13 to include these directories. It includes no other changes.

-- 
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] Reload fact variable during run

2012-11-07 Thread Denmat
Hi,

Not from within puppet but there are external ways (ssh, MCollective ). From 
them you can schedule action.

You can run puppet again (as compilation is done on the master not the client). 
The facts are sent to the master at the start of the run and puppet can't do 
anything with them midstream.

On the next run puppet will have the status of the fact (be it the way you want 
or not).

THT,
Den 

On 08/11/2012, at 1:08, loic  wrote:

> Hi,
> 
> I just made a custom fact to display a status about mysql.
> The fact variable is 'foo'.
> In a module I test this fact variable to apply or not a ressource :
> class bar {
>if $::foo == 'toto' {
>   notice("Execute ressource")
>   # Reload fact variable ?
>   if $::foo == 'toto' {
>  fail("Ressource not applied")
>   }
>}
> }
> 
> After apply my ressource I would like to reload the fact variable to test if 
> there is a mysql status modification.
> Do you know how can do that in a puppet class ?
> 
> Thank you in advance.
> 
> Loïc
> -- 
> 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/-/-uh5H26o0B0J.
> 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] Puppet creates a file even though an exec fails

2012-11-07 Thread Chris Hirsch
>> 
>> 
>> Except my resource is a File and not an Exec. refreshonly is invalid
>> for a File afik. Are there alternatives you may suggest to
>> accomplish the same?
> 
> I believe this is http://projects.puppetlabs.com/issues/5876 in action :(
> 

Bummer! Especially since I added a me-too to that bug over a year ago.  I guess 
I'll have to re-think my implementation. 

-- 
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 creates a file even though an exec fails

2012-11-07 Thread R.I.Pienaar


- Original Message -
> From: "Chris Hirsch" 
> To: puppet-users@googlegroups.com
> Sent: Wednesday, November 7, 2012 9:18:15 PM
> Subject: Re: [Puppet Users] Puppet creates a file even though an exec fails
> 
> 
> Except my resource is a File and not an Exec. refreshonly is invalid
> for a File afik. Are there alternatives you may suggest to
> accomplish the same?

I believe this is http://projects.puppetlabs.com/issues/5876 in action :(

-- 
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: for i in array do something - iteration irritation

2012-11-07 Thread earthgecko
Apologies

app::thing { 'foo':
  config_templates = ['foo.conf', 'foo.more.conf']
}

-- 
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/-/tsXtAlEp-8sJ.
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 failing to run

2012-11-07 Thread Jeff McCune
On Tue, Nov 6, 2012 at 7:08 PM, Asif Iqbal  wrote:

> I did some clean up. Now I have only one version of puppet and facter.


It still seems like you could have stale files.

Could you verify there are no stale files by pasting the output of this
command?

ruby -r puppet -e 'puts %w{ puppet facter }.collect {|d| $LOAD_PATH.collect
{|l| { l => Dir["#{l}/#{d}/**.rb"] }}}.to_yaml'

This will locate all of the puppet and facter libraries that are present
along the ruby load path.

Thanks,
-Jeff

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



Re: [Puppet Users] Puppet creates a file even though an exec fails

2012-11-07 Thread Chris Hirsch

Except my resource is a File and not an Exec. refreshonly is invalid for a File 
afik. Are there alternatives you may suggest to accomplish the same?

> You  want "refreshonly => true" on file2, as well.
> 
> On Nov 7, 2012, at 3:56 PM, Chris Hirsch  wrote:
> 
>> Hi all,
>> 
>> I'm trying to figure out if my expectations are correct for this class. 
>> Basically I'd like to have file1 created and then run an exec. If that exec 
>> should fail file2 should NOT be created.
>> Currently as you can see from the below output, the refresh failed yet file2 
>> was still created. 
>> 
>> class christest {
>>  file{"/tmp/file1": content=>"file1"} ~> exec{ "/bin/false": refreshonly => 
>> true} -> file {"/tmp/file2": content=>"file2"}
>> }
>> 
>> puppet --version
>> 2.7.17
>> 
>> puppet agent --test
>> 
>> notice: /Stage[main]/Christest/File[/tmp/file1]/ensure: defined content as 
>> '{md5}826e8142e6baabe8af779f5f490cf5f5'
>> info: /Stage[main]/Christest/File[/tmp/file1]: Scheduling refresh of 
>> Exec[/bin/false]
>> err: /Stage[main]/Christest/Exec[/bin/false]: Failed to call refresh: 
>> /bin/false returned 1 instead of one of [0] at 
>> /etc/puppet/environments/chirsch/modules/christest/manifests/init.pp:2
>> notice: /Stage[main]/Christest/File[/tmp/file2]/ensure: defined content as 
>> '{md5}1c1c96fd2cf8330db0bfa936ce82f3b9'
>> notice: Finished catalog run in 0.27 seconds
>> 
>> 
>> -- 
>> 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.
> 

-- 
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] for i in array do something - iteration irritation

2012-11-07 Thread earthgecko
Hi

I am sure that there is some way to iterate an array and do something for 
each in.  It must be a wheel that has been invented (even if in a ruby 
function)?

I have needed to do something like this a few times now and I reckon 
someone clever has already done it :)

Using a normal bash type for loop as an example:

app::thing { 'foo':
  $config_templates = ['foo.conf', 'foo.more.conf']
}

define app::thing(
  $config_templates = '',
)  {
  if $config_templates != '' {
for i_config in $config_templates
do
  file { "/opt/app/thing/${name}/conf/${i_config}":
content => template("app/${name}/conf_templates/${i_config}.erb"),
  }
done
  }
}

Is there something in stdlib or forge to iterate an array and do 
something?  

-- 
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/-/4UT6Pg50gEcJ.
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 creates a file even though an exec fails

2012-11-07 Thread Mason Turner
You  want "refreshonly => true" on file2, as well.

On Nov 7, 2012, at 3:56 PM, Chris Hirsch  wrote:

> Hi all,
> 
> I'm trying to figure out if my expectations are correct for this class. 
> Basically I'd like to have file1 created and then run an exec. If that exec 
> should fail file2 should NOT be created.
> Currently as you can see from the below output, the refresh failed yet file2 
> was still created. 
> 
> class christest {
>   file{"/tmp/file1": content=>"file1"} ~> exec{ "/bin/false": refreshonly => 
> true} -> file {"/tmp/file2": content=>"file2"}
> }
> 
> puppet --version
> 2.7.17
> 
> puppet agent --test
> 
> notice: /Stage[main]/Christest/File[/tmp/file1]/ensure: defined content as 
> '{md5}826e8142e6baabe8af779f5f490cf5f5'
> info: /Stage[main]/Christest/File[/tmp/file1]: Scheduling refresh of 
> Exec[/bin/false]
> err: /Stage[main]/Christest/Exec[/bin/false]: Failed to call refresh: 
> /bin/false returned 1 instead of one of [0] at 
> /etc/puppet/environments/chirsch/modules/christest/manifests/init.pp:2
> notice: /Stage[main]/Christest/File[/tmp/file2]/ensure: defined content as 
> '{md5}1c1c96fd2cf8330db0bfa936ce82f3b9'
> notice: Finished catalog run in 0.27 seconds
> 
> 
> -- 
> 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.



[Puppet Users] Puppet creates a file even though an exec fails

2012-11-07 Thread Chris Hirsch
Hi all,

I'm trying to figure out if my expectations are correct for this class. 
Basically I'd like to have file1 created and then run an exec. If that exec 
should fail file2 should NOT be created.
Currently as you can see from the below output, the refresh failed yet file2 
was still created. 

class christest {
   file{"/tmp/file1": content=>"file1"} ~> exec{ "/bin/false": refreshonly => 
true} -> file {"/tmp/file2": content=>"file2"}
}

puppet --version
2.7.17

puppet agent --test

notice: /Stage[main]/Christest/File[/tmp/file1]/ensure: defined content as 
'{md5}826e8142e6baabe8af779f5f490cf5f5'
info: /Stage[main]/Christest/File[/tmp/file1]: Scheduling refresh of 
Exec[/bin/false]
err: /Stage[main]/Christest/Exec[/bin/false]: Failed to call refresh: 
/bin/false returned 1 instead of one of [0] at 
/etc/puppet/environments/chirsch/modules/christest/manifests/init.pp:2
notice: /Stage[main]/Christest/File[/tmp/file2]/ensure: defined content as 
'{md5}1c1c96fd2cf8330db0bfa936ce82f3b9'
notice: Finished catalog run in 0.27 seconds


-- 
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: Announce: Puppet Dashboard 1.2.13 Available

2012-11-07 Thread Stefan Heijmans


Matthaus,
I also noticed the following messages with the 1.2.13 db:migrate rake task, 
haven't seem them before;
# rake db:migrate RAILS_ENV=production
config.gem: Unpacked gem rspec-1.3.2 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem sass-3.1.2 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem thoughtbot-shoulda-2.10.2 in vendor/gems has no 
specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem haml-3.1.2 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem rack-1.1.2 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem rspec-rails-1.3.4 in vendor/gems has no 
specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem daemons-1.0.10 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem will_paginate-2.3.15 in vendor/gems has no 
specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem json_pure-1.5.1 in vendor/gems has no 
specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem factory_girl-1.3.3 in vendor/gems has no 
specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem rdoc-3.6.1 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem mocha-0.9.7 in vendor/gems has no specification 
file. Run 'rake gems:refresh_specs' to fix this.
 

Stefan

-- 
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/-/Yp3DpRU4t6EJ.
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: Hiera autolookup for defined types

2012-11-07 Thread Bruno Leon

Thanks John for your very interesting reply.

On Tuesday, November 6, 2012 4:13:03 PM UTC-5, jcbollinger wrote:
>
>
>
> On Tuesday, November 6, 2012 11:04:46 AM UTC-6, Bruno Leon wrote:
>>
>> Hello, 
>>
>> since Puppet 3 hiera is doing auto variable lookup for classes, which in 
>> my 
>> view makes the code much clearer simply because we can use 
>> include foo 
>> instead of 
>> class { 'foo': 
>> param1 => value, 
>> param2 => value, 
>>  } 
>>
>
>
> There are other advantages to using 'include', too, so bravo!
>  
>
>>
>> However, AFAIK there is no such feature as auto looking parameters for 
>> defined 
>> type. 
>> A common case is multiple vhost in Apache.
>>
>
>
> You already started answering your own question when you wrote 
> "multiple".  For a similar feature to work for defined types, it has to be 
> able to identify keys to use to lookup parameters for a given instance, 
> preferably without risk of colliding with classes or other defined-type 
> instances.
>

Actually the point was that the first key would be the defined type, which 
then has a "subkey" for each instance.
There is a risk of collision between defined type and class names, but that 
is already the case within Puppet language anyway.
 

>  
>
>>
>> Even though you can have apache installed as simply as "include apache", 
>> you 
>> still have a lot of define (one per vhost), possibly each with different 
>> parameters. 
>>
>> Would it be possible to have hiera looking up for a hash of parameters. 
>>
>> Something like this in hiera: 
>>
>> --- 
>> apache_vhost: 
>> website1: 
>> web_param1: 'foo' 
>> web_param2: 'bar' 
>> website2: 
>> web_param1: 'another_foor' 
>> web_param2: 'another_bar' 
>>
>> And in the manifest, this would be invoked as simply as: 
>>
>> node "test" { 
>> include apache 
>> apache_vhost { 'website1': } 
>> apache_vhost { 'website2': } 
>> } 
>>
>> Any ideas on this ? Any plans of implementation ? 
>>
>
>
> You can do something very like what you describe via the built-in 
> create_resources() function.  Given the data exactly as you structured it 
> in your example, you could do this:
>
> # load the vhost data as a hash of hashes
> $vhost_data = hiera('apache_vhost')
>
> # declare the apache_vhost instances
> create_resources('apache_vhost', $vhost_data)
>
> # (that's it)
>
> See 
> http://docs.puppetlabs.com/references/3.0.0/function.html#createresourcesfor 
> more information.
>

This sound quite perfect for me, I'll give it a try ! 

Bruno 

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



[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-11-07 Thread Nick Fagerlund


On Tuesday, November 6, 2012 2:44:25 PM UTC-8, Forrie wrote:

>
>
> path ~ ^/file_(metadata|content)/files/etc/
> path /file
> auth yes
> allow /^(.+\.)?ourdomain.com$/
> allow_ip 10.0.0.0/8
>
>
This path is still wrong. The path in auth.conf needs to refer to the 
LOGICAL path that you set up with the mount point in fileserver.conf, not 
to the directory on disk.

In your puppet manifest we see the line:
source  => "puppet:///etc/ntp.conf",

This means you must have a mount point called [etc] in fileserver.conf, 
right? So regardless of where that mount point points to on disk 
(/etc/puppet/files/etc), Puppet knows it as /etc. Therefore, the path in 
auth.conf MUST be 
path ~ ^/file_(metadata|content)/etc/, NOT /files/etc/ or /files/. You 
cannot bulk-control everything in the /etc/puppet/files directory the way 
you're trying to, because puppet's fileserver does not know what 
/etc/puppet/files is. It knows about each mount point separately, and knows 
about them by the name you gave them in fileserver.conf. Put another way, 
your auth.conf rules must resemble the puppet:/// URLs you're using to 
access the files. 

Fix that and you'll fix your problem. 

Additionally, it looks like your auth.conf file doesn't have an entry for 
node objects yet, which is causing some unrelated errors. You can find out 
about that here: 

http://docs.puppetlabs.com/puppet/3/reference/release_notes.html#puppet-agent-now-requires-node-access

Any word on when a fixed release is going to come out :-)
>

Nope, not yet. 

-- 
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/-/1Y4fV_tcj_EJ.
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: Managing home directory on Windows

2012-11-07 Thread Nick Fagerlund


On Tuesday, November 6, 2012 2:22:25 PM UTC-8, Josh Cooper wrote:
>
>
> > That said, would it perhaps be worth putting a note/warning in the 
> > documentation for managehome that it will delete the user's home 
> > directory and any data therein?  The removal is mentioned under the 
> > 'Features' entry for manages_homedir, but isn't explicitly called out 
> > in the 'Parameters' entry for managehome. 
>
> Sounds reasonable to me. 
>
>
OK! Merged. 
https://github.com/puppetlabs/puppet/commit/87b3d29539cd931daff96621fcce11c2c27ac57e

-- 
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/-/Y4B7jGgBRMsJ.
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: augeas syntax for adding similar lines to hosts.allow

2012-11-07 Thread Nathan Huff
You are going to probably need something along the lines of

context => '/files/etc/hosts.allow'
changes => [
  'ins 01 after *[last()]',
  'set 01/process[1] ssh',
  'set 01/process[2] ssh2',
  'set 01/client ipaddr'
]
onlyif => 'match *[process[1] == 'ssh' and 'client' == 'ipaddr'] size == 0'

you might need to tweak it a little I didn't try it verbatim, but it should 
get you on the right track.

On Tuesday, November 6, 2012 1:37:08 PM UTC-6, Chad Lewis wrote:
>
> I've found a similar thread here, but it doesn't do quite what I need.
>
> https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/VMloh1KrSew
>
> I have multiple lines of the form below in hosts.allow:
>
> sshd,sshd2: 1.1.1.1
> sshd,sshd2: 2.2.2.2
> etc.
>
> I'm struggling with the syntax to add yet another "sshd,sshd2: client" 
> line to hosts.allow.
>
> augtool is treating the lines as follows
> augtool> ls /files/etc/hosts.allow/*[last()]
> process[1] = sshd
> process[2] = sshd2
> client = 3.3.3.3
>
> I need to add another line when the processes already exist, but the 
> client is new.
>
> Any suggestions?
>
>

-- 
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/-/MiixJMy20jQJ.
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: Announce: Puppet Dashboard 1.2.13 Available

2012-11-07 Thread Matthaus Owens
Stefan,
Thanks for catching that. A recent change to our packaging workflow
unintentionally stopped empty directories from getting included in the
tarballs. We've since reverted that change, and a new release of
Dashboard will be forthcoming with an updated tarball, complete with
tmp dir..

On Wed, Nov 7, 2012 at 8:05 AM, Stefan Heijmans  wrote:
> Hi,
>
> Just updated from 1.2.11 to 1.2.13 with the tarball
> (http://downloads.puppetlabs.com/dashboard/puppet-dashboard-1.2.13.tar.gz)
>
> Starting puppet-dashboard-workers it gives the following message;
>
> # service puppet-dashboard-workers start
> Starting puppet-dashboard-workers:
> /opt/puppet-dashboard/vendor/plugins/delayed_job/lib/delayed/command.rb:65:in
> `mkdir': No such file or directory - /opt/puppet-dashboard/tmp/pids
> (Errno::ENOENT)
> from
> /opt/puppet-dashboard/vendor/plugins/delayed_job/lib/delayed/command.rb:65:in
> `daemonize'
> from /opt/puppet-dashboard/script/delayed_job:5
>[FAILED]
> #
>
> # ll -d /opt/puppet-dashboard/tmp
> ls: /opt/puppet-dashboard/tmp: No such file or directory
> #
>
> Creating this directory fixes it.
>
>
> Checking the tarball shows that in 1.2.13 the tmp directory is not provided
> any more, in 1.2.11 it was still there.
> # tar -tzvf puppet-dashboard-1.2.11.tar.gz|grep tmp
> -rw-r--r-- matthaus/allstaff923 2011-08-24 22:37:13
> puppet-dashboard-1.2.11/vendor/rails/railties/lib/tasks/tmp.rake
> drwxr-xr-x matthaus/allstaff  0 2012-09-13 23:28:22
> puppet-dashboard-1.2.11/tmp/
> # tar -tzvf puppet-dashboard-1.2.13.tar.gz|grep tmp
> -rw-r--r-- matthaus/allstaff923 2012-11-06 00:15:09
> puppet-dashboard-1.2.13/vendor/rails/railties/lib/tasks/tmp.rake
> #
>
> Stefan
>
> --
> 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/-/8yrKNShvqbIJ.
> 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: Puppet NetApp Network device management...

2012-11-07 Thread Gavin Williams
:( Seems to be one step forward and two steps back atm... 

Following the successful creation and deletion of NetApp filer volumes 
using puppet earlier in the day, I added the required provider and type to 
support qtree creation and deletion... 

However since then, I haven't been able to create either a new volume or a 
new qtree reliably... 
It seems that it will intermittently work, but the majority of the time the 
puppet device run will fail with 

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not autoload puppet/type/netapp_volume: Could not autoload 
> puppet/provider/netapp_volume/netapp_volume: uninitialized constant 
> Puppet::Util::NetworkDevice on node actint-star-nactl01
>
> This error alternates between provider/netapp_volume/netapp_volume and 
provider/netapp_qtree/netapp_qtree... 
It doesn't appear to be due to config, as I've stripped the node config 
right back to base and still seeing errors... 

The node config I was trying to work towards is: 

> netapp_qtree { 'q_puppet_test1':
> ensure => present,
> volume => 'v_puppet_test',
> require => Netapp_volume['v_puppet_test1']
> }
>
> netapp_volume { 'v_puppet_test1':
> ensure => present,
> initsize => "1t",
> aggregate => "aggr01",
> spaceres => "none",
> }
>

I've tried multiple agent runs, multiple master restarts, all to no 
avail... 

Any ideas on what could be the issue? 

As always, latest code is available in Git... 

Cheers
Gavin 


On Wednesday, 7 November 2012 12:06:17 UTC, Gavin Williams wrote:
>
> Quick update... It looks like all that was needed to resolve the below was 
> a puppetmaster restart. 
>
> Have successfully managed to create a new volume on the NetApp filer using 
> puppet :) :D
>
> Now to plough on with adding support for the rest of the bits we need :) 
>
> Cheers
> Gavin 
>
> On Tuesday, 6 November 2012 17:40:34 UTC, Gavin Williams wrote:
>>
>> Scratch my last, had a bit of a eureka moment... 
>>
>> Added ':transport: to the attr_accessor against device.rb, and it started 
>> working again... 
>>
>> However now failing elsewhere... 
>> Have got the following against a relevant node:
>>
>> # Test NetApp volume provider
>>> netapp_volume { 'v_puppet_test':
>>> ensure => present,
>>> initsize => "1g",
>>> aggr => "aggr01",
>>> spaceresv => "none",
>>> }
>>>
>>
>> The run is failing with:
>>
>>>  Error: Could not retrieve catalog from remote server: Error 400 on 
>>> SERVER: Invalid parameter aggr at /etc/puppet/manifests/site.pp:30 on node 
>>> actint-star-nactl01
>>> Error: Could not set 'present' on ensure: undefined method 
>>> `result_reason' for # at 
>>> 27:/etc/puppet/manifests/site.pp
>>> Error: Could not set 'present' on ensure: undefined method 
>>> `result_reason' for # at 
>>> 27:/etc/puppet/manifests/site.pp
>>> Wrapped exception:
>>> undefined method `result_reason' for #
>>> Error: 
>>> /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]/ensure:
>>>  
>>> change from absent to present failed: Could not set 'present' on ensure: 
>>> undefined method `result_reason' for # at 
>>> 27:/etc/puppet/manifests/site.pp
>>>
>>
>>  Got some debug logging, which is giving:
>>
>>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance 
>>> of Netapp Volume v_puppet_test
>>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: >> status="failed" reason="No volume named 'v_puppet_test' exists" 
>>> errno="13040">
>>>
>>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't 
>>> currently exist.
>>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
>>> Volume v_puppet_test of initial size 1g
>>>
>>
>> So I can see that the provider exists? is working correctly, and it's 
>> trying to fire the create def... 
>>
>> The type is defined correctly afaik:
>>
>>> Puppet::Type.newtype(:netapp_volume) do 
>>>   @doc = "Manage Netapp Volume creation, modification and deletion."
>>>   
>>>   apply_to_device
>>>   
>>>   ensurable do
>>> desc "Netapp Volume resource state. Valid values are: present, absent."
>>> 
>>> defaultto(:present)
>>> 
>>> newvalue(:present) do 
>>>   provider.create
>>> end
>>> 
>>> newvalue(:absent) do 
>>>   provider.destroy
>>> end
>>>   end
>>>   
>>>   newparam(:name) do
>>> desc "The volume name."
>>> isnamevar
>>> #newvalues(/^[[:alpha:][:digit:]\.]+$/)
>>>   end
>>>
>>>   newparam(:initsize) do
>>> desc "The initial volume size."
>>> defaultto "1g"
>>>  
>>>   end
>>>   
>>>   newparam(:aggr) do
>>> desc "The aggregate this volume should be created in." 
>>> 
>>>   end
>>>   
>>>   newparam(:spaceresv) do
>>> desc "The space reservation mode."
>>> 
>>>   end
>>> end
>>>

[Puppet Users] Re: Announce: Puppet Dashboard 1.2.13 Available

2012-11-07 Thread Stefan Heijmans


Hi,

Just updated from 1.2.11 to 1.2.13 with the tarball (
http://downloads.puppetlabs.com/dashboard/puppet-dashboard-1.2.13.tar.gz)

Starting puppet-dashboard-workers it gives the following message;

# service puppet-dashboard-workers start
Starting puppet-dashboard-workers: 
/opt/puppet-dashboard/vendor/plugins/delayed_job/lib/delayed/command.rb:65:in 
`mkdir': No such file or directory - /opt/puppet-dashboard/tmp/pids 
(Errno::ENOENT)
from 
/opt/puppet-dashboard/vendor/plugins/delayed_job/lib/delayed/command.rb:65:in 
`daemonize'
from /opt/puppet-dashboard/script/delayed_job:5
   [FAILED]
#

# ll -d /opt/puppet-dashboard/tmp
ls: /opt/puppet-dashboard/tmp: No such file or directory
#

Creating this directory fixes it.


Checking the tarball shows that in 1.2.13 the tmp directory is not provided 
any more, in 1.2.11 it was still there.
# tar -tzvf puppet-dashboard-1.2.11.tar.gz|grep tmp
-rw-r--r-- matthaus/allstaff923 2011-08-24 22:37:13 
puppet-dashboard-1.2.11/vendor/rails/railties/lib/tasks/tmp.rake
drwxr-xr-x matthaus/allstaff  0 2012-09-13 23:28:22 
puppet-dashboard-1.2.11/tmp/
# tar -tzvf puppet-dashboard-1.2.13.tar.gz|grep tmp
-rw-r--r-- matthaus/allstaff923 2012-11-06 00:15:09 
puppet-dashboard-1.2.13/vendor/rails/railties/lib/tasks/tmp.rake
#

Stefan

-- 
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/-/8yrKNShvqbIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Augeas and custom lenses?

2012-11-07 Thread Dominic Cleal
On 06/11/12 22:31, Jakov Sosic wrote:
> Hi
> 
> I want to modify one of the existing lenses to better suit my needs, but
> I don't know where to put it on the filesystem?
> 
> It seems wrong to overwrite file in /usr/share/augeas/lenses/dist or to
> rebuild augeas-libs, is there any other way to distribute modifications
> of existing lenses or completely new lenses?

You can deploy them as file resources or packages (as Ian suggested)
into /usr/share/augeas/lenses, which takes precedence over the dist
subdirectory.

If you are using 2.7.18 or higher, you can also pluginsync lenses in the
same way as facts etc.  This should take precedence over dist lenses
too.  Store the lens at:

  modulename/lib/augeas/lenses/custom.aug

(http://docs.puppetlabs.com/guides/plugins_in_modules.html)

-- 
Dominic Cleal
Red Hat Engineering

-- 
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: Can Puppet alert about dead nodes?

2012-11-07 Thread Martijn Heemels
Thanks for the info, Greg and Walter. I missed that announcement. We can
keep using the current Dashboard until something else comes along. I have
no problems with the parts that we use.

The deprecation actually makes sense, now that I read it. I was never happy
with the ENC functionality, which is why we're just using it for reporting.
I'm glad Puppetlabs seems committed to provide some sort of replacement, in
the form of more specialized tools for ENC and reporting, integrated with
PuppetDB, which we're already using.


On Wed, Nov 7, 2012 at 3:50 PM, Walter Heck  wrote:

> The open source dashboard is being deprecated indeed, as announced on this
> list by puppet Labs last month.
> The enterprise dashboard is a different story.
>
> Over time there will be a replacement for the open source dashboard, but
> it might be a while and it might not be a one to one replacement.
>
> Be advised :-)
>
> sent from my mobile
> On Nov 7, 2012 12:36 AM, "Martijn"  wrote:
>
>> Op donderdag 1 november 2012 19:03:20 UTC+1 schreef Greg Sutcliffe het
>> volgende:
>>
>>> On 1 November 2012 17:54, Lucas Vickers  wrote:
>>>
 I am currently using the open source edition so I have no dashboard.

>>>
>>> Puppet Dashboard is opensource, so you could use it, but it's being
>>> deprecated (last I heard, anyway). You could also checkout The Foreman,
>>> which will display nodes out-of-sync (and email you about it, if you like).
>>>
>>>
>> We also use Puppet Dashboard for reporting, and it visually shows changed
>> nodes and shows the nodes that have not reported recently. We use the open
>> source Puppet stack and the Dashboard nicely complements it.
>>
>> I've not heard anything about it being deprecated and have to assume
>> you're mistaken since a quick Google could find no mention of it. Dashboard
>> is still actively updated, and since it's the main interface to Puppet
>> Enterprise as well I don't see it going away soon. The Foreman is also an
>> impressive dashboard with more features than Puppet Dashboard but a bit
>> more complexity as well.
>>
>> Regards, Martijn Heemels
>>
>> --
>> 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/-/jkwbFc8FL6kJ.
>> 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.
>

-- 
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: Can Puppet alert about dead nodes?

2012-11-07 Thread Walter Heck
The open source dashboard is being deprecated indeed, as announced on this
list by puppet Labs last month.
The enterprise dashboard is a different story.

Over time there will be a replacement for the open source dashboard, but it
might be a while and it might not be a one to one replacement.

Be advised :-)

sent from my mobile
On Nov 7, 2012 12:36 AM, "Martijn"  wrote:

> Op donderdag 1 november 2012 19:03:20 UTC+1 schreef Greg Sutcliffe het
> volgende:
>
>> On 1 November 2012 17:54, Lucas Vickers  wrote:
>>
>>> I am currently using the open source edition so I have no dashboard.
>>>
>>
>> Puppet Dashboard is opensource, so you could use it, but it's being
>> deprecated (last I heard, anyway). You could also checkout The Foreman,
>> which will display nodes out-of-sync (and email you about it, if you like).
>>
>>
> We also use Puppet Dashboard for reporting, and it visually shows changed
> nodes and shows the nodes that have not reported recently. We use the open
> source Puppet stack and the Dashboard nicely complements it.
>
> I've not heard anything about it being deprecated and have to assume
> you're mistaken since a quick Google could find no mention of it. Dashboard
> is still actively updated, and since it's the main interface to Puppet
> Enterprise as well I don't see it going away soon. The Foreman is also an
> impressive dashboard with more features than Puppet Dashboard but a bit
> more complexity as well.
>
> Regards, Martijn Heemels
>
> --
> 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/-/jkwbFc8FL6kJ.
> 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] SSH authorized key module with support for multiple local accounts (Request for Feedback)

2012-11-07 Thread Lukas Hetzenecker
Hello,

my module is now available from puppet forge too, thanks for your 
suggestion: http://forge.puppetlabs.com/hetzeneckerl/ssh_authorized_key

However, I'm still having one problem developing this module:

On *every* run I get some of these messages:

/Stage[main]/Ssh::Hetzeneckerl/Ssh[long_ssh_key]/Pxp_ssh_authorized_key_base[long_ssh_key]/user:
 
defined 'type' as 'ssh-rsa'
/Stage[main]/Ssh::Hetzeneckerl/Ssh[long_ssh_key]/Pxp_ssh_authorized_key_base[long_ssh_key]/user:
 
defined 'user' as 'root'

or when running with the noop flag: current_value absent, should be ssh-rsa 
(noop)
So basically the resource does not remember the previous records 
("historical values") and/or does not know the actual current values.

These messages are generated by the apply_parameter method in 
resource_harness.rb where historical_value is set to nil, the full 
stacktrace is at the end of this message.

Could anybody have a look at the code uploaded to github and help me 
debugging this error and give me some clues how I can change the records 
returned by the fileparser?

Thanks for your help,
Lukas Hetzenecker

 STACKTRACE 

/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:62:in 
`perform_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in 
`each'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in 
`perform_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:137:in 
`evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in `eval_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:348:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:347:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:383:in `traverse'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:144:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:122:in `apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in `apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:179:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:265:in 
`apply_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:213:in `main'
/usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:146:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:87:in `execute'
/usr/bin/puppet:4

-- 
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/-/T-n6MU6q49UJ.
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] File header including timestamp

2012-11-07 Thread j4m3s
Thank you very much Matt.  My searches hadn't turned that up - I was 
searching on keywords relating to templates I think.

Thanks again, James.

On Wednesday, November 7, 2012 2:12:27 PM UTC, Matthew Burgess wrote:
>
> On Wed, Nov 7, 2012 at 2:00 PM, j4m3s > 
> wrote: 
> > I have noticed that if I create a hosts file entry using the host {} 
> type, a 
> > header is added to teh top of the file showing when it was last updated. 
> > I'm wondering if it is possible something similar in a template? 
>  Calling 
> > <%= Time.now().to_s() %> inside the template (obviously) causes the file 
> to 
> > be updated each time puppet runs - which isn't what I'm looking for. 
> > 
> > I have tried to find the host type on github (in the puppet source) but 
> > couldn't track it down.  Is it possible to reproduce the functionality 
> in my 
> > own template headers? 
>
> There's a thread on this topic at 
>
> https://groups.google.com/forum/?fromgroups#!search/puppet$20cron$20job$20class/puppet-users/PMTVEpXw8I0/Wsckx5euwRgJ
>  
> - in short, copy and paste code from Puppet's crontab.rb. 
>
> Hope this helps, 
>
> Matt. 
>

-- 
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/-/LQ3z59qD1eoJ.
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] File header including timestamp

2012-11-07 Thread Matthew Burgess
On Wed, Nov 7, 2012 at 2:00 PM, j4m3s  wrote:
> I have noticed that if I create a hosts file entry using the host {} type, a
> header is added to teh top of the file showing when it was last updated.
> I'm wondering if it is possible something similar in a template?  Calling
> <%= Time.now().to_s() %> inside the template (obviously) causes the file to
> be updated each time puppet runs - which isn't what I'm looking for.
>
> I have tried to find the host type on github (in the puppet source) but
> couldn't track it down.  Is it possible to reproduce the functionality in my
> own template headers?

There's a thread on this topic at
https://groups.google.com/forum/?fromgroups#!search/puppet$20cron$20job$20class/puppet-users/PMTVEpXw8I0/Wsckx5euwRgJ
- in short, copy and paste code from Puppet's crontab.rb.

Hope this helps,

Matt.

-- 
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] Reload fact variable during run

2012-11-07 Thread loic
Hi,

I just made a custom fact to display a status about mysql.
The fact variable is 'foo'.
In a module I test this fact variable to apply or not a ressource :
class bar {
   if $::foo == 'toto' {
  notice("Execute ressource")
  # Reload fact variable ?
  if $::foo == 'toto' {
 fail("Ressource not applied")
  }
   }
}

After apply my ressource I would like to reload the fact variable to test 
if there is a mysql status modification.
Do you know how can do that in a puppet class ?

Thank you in advance.

Loïc

-- 
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/-/-uh5H26o0B0J.
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] File header including timestamp

2012-11-07 Thread j4m3s
I have noticed that if I create a hosts file entry using the host {} type, 
a header is added to teh top of the file showing when it was last updated.  
I'm wondering if it is possible something similar in a template?  Calling 
<%= Time.now().to_s() %> inside the template (obviously) causes the file to 
be updated each time puppet runs - which isn't what I'm looking for.  

I have tried to find the host type on github (in the puppet source) but 
couldn't track it down.  Is it possible to reproduce the functionality in 
my own template headers?

Thanks, James.

-- 
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/-/72U23qmrzYsJ.
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: Config Sync

2012-11-07 Thread jcbollinger


On Wednesday, November 7, 2012 5:34:16 AM UTC-6, John Macleod wrote:
>
> What I am looking to do is use Puppet to automatically sync a handful of 
> application configuration files between distributed servers, and bounce 
> (reload) the applicable service.
>
> Forgive me for asking a question that is covered somewhere, however I did 
> my best homework on the topic and found numerous posts to suggest Puppet 
> for this, but no real world examples of how to do it.
>
>
Syncing files and restarting services is pretty basic stuff for Puppet.  I 
confess I'm surprised that you didn't find "real world" examples, but if 
they're really so rare then it's because those are not the tasks that 
people usually get hung up on.

I do recommend you read the Puppet reference manual 
(http://docs.puppetlabs.com/puppet/3/reference/), and especially its 
sections on the Puppet language.  If nothing else, you must at minimum read 
the one-page language summary, which in fact (and coincidentally) has an 
example of exactly what you're asking about.


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



RE: [Puppet Users] Config Sync

2012-11-07 Thread Bernd Adamowicz
The Puppet cookbook is always a good starting point: http://puppetcookbook.com/.

And for your particular problem this is the real world example: 
http://puppetcookbook.com/posts/restart-a-service-when-a-file-changes.html

Bernd

From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On 
Behalf Of John Macleod
Sent: Mittwoch, 7. November 2012 12:34
To: puppet-users@googlegroups.com
Subject: [Puppet Users] Config Sync

What I am looking to do is use Puppet to automatically sync a handful of 
application configuration files between distributed servers, and bounce 
(reload) the applicable service.

Forgive me for asking a question that is covered somewhere, however I did my 
best homework on the topic and found numerous posts to suggest Puppet for this, 
but no real world examples of how to do it.

Thanks in advance!

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/-/4XQlkYxDmg8J.
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: Puppet NetApp Network device management...

2012-11-07 Thread Gavin Williams
Quick update... It looks like all that was needed to resolve the below was 
a puppetmaster restart. 

Have successfully managed to create a new volume on the NetApp filer using 
puppet :) :D

Now to plough on with adding support for the rest of the bits we need :) 

Cheers
Gavin 

On Tuesday, 6 November 2012 17:40:34 UTC, Gavin Williams wrote:
>
> Scratch my last, had a bit of a eureka moment... 
>
> Added ':transport: to the attr_accessor against device.rb, and it started 
> working again... 
>
> However now failing elsewhere... 
> Have got the following against a relevant node:
>
> # Test NetApp volume provider
>> netapp_volume { 'v_puppet_test':
>> ensure => present,
>> initsize => "1g",
>> aggr => "aggr01",
>> spaceresv => "none",
>> }
>>
>
> The run is failing with:
>
>>  Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: Invalid parameter aggr at /etc/puppet/manifests/site.pp:30 on node 
>> actint-star-nactl01
>> Error: Could not set 'present' on ensure: undefined method 
>> `result_reason' for # at 
>> 27:/etc/puppet/manifests/site.pp
>> Error: Could not set 'present' on ensure: undefined method 
>> `result_reason' for # at 
>> 27:/etc/puppet/manifests/site.pp
>> Wrapped exception:
>> undefined method `result_reason' for #
>> Error: 
>> /Stage[main]//Node[actint-star-nactl01]/Netapp_volume[v_puppet_test]/ensure: 
>> change from absent to present failed: Could not set 'present' on ensure: 
>> undefined method `result_reason' for # at 
>> 27:/etc/puppet/manifests/site.pp
>>
>
>  Got some debug logging, which is giving:
>
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance 
>> of Netapp Volume v_puppet_test
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: > status="failed" reason="No volume named 'v_puppet_test' exists" 
>> errno="13040">
>>
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't 
>> currently exist.
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
>> Volume v_puppet_test of initial size 1g
>>
>
> So I can see that the provider exists? is working correctly, and it's 
> trying to fire the create def... 
>
> The type is defined correctly afaik:
>
>> Puppet::Type.newtype(:netapp_volume) do 
>>   @doc = "Manage Netapp Volume creation, modification and deletion."
>>   
>>   apply_to_device
>>   
>>   ensurable do
>> desc "Netapp Volume resource state. Valid values are: present, absent."
>> 
>> defaultto(:present)
>> 
>> newvalue(:present) do 
>>   provider.create
>> end
>> 
>> newvalue(:absent) do 
>>   provider.destroy
>> end
>>   end
>>   
>>   newparam(:name) do
>> desc "The volume name."
>> isnamevar
>> #newvalues(/^[[:alpha:][:digit:]\.]+$/)
>>   end
>>
>>   newparam(:initsize) do
>> desc "The initial volume size."
>> defaultto "1g"
>>  
>>   end
>>   
>>   newparam(:aggr) do
>> desc "The aggregate this volume should be created in." 
>> 
>>   end
>>   
>>   newparam(:spaceresv) do
>> desc "The space reservation mode."
>> 
>>   end
>> end
>>
>>
> Latest code in Git...  
>
> Any ideas? 
>
> Cheers
> Gavin 
>
> On Monday, 5 November 2012 17:46:07 UTC, Gavin Williams wrote:
>>
>> Looks like the below error was caused by some locally cached code that 
>> hadn't been updated by my Git pull :s
>>
>> Resolved that, and now am getting the following:
>>
>> $ sudo puppet device -v
>>> Info: starting applying configuration to actint-star-nactl01 at 
>>> actint-star-nactl01
>>> Warning: Local environment: "production" doesn't match server specified 
>>> node environment "development", switching agent to "development".
>>> Info: Retrieving plugin
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet]/mode: mode 
>>> changed '0775' to '0755'
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider]/mode:
>>>  
>>> mode changed '0775' to '0755'
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider/netapp.rb]/content:
>>>  
>>> content changed '{md5}399796914d8aeb68387455de5b24f735' to 
>>> '{md5}3be2121ab99116c4bc89db21d5d4b54b'
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/provider/netapp_volume/netapp_volume.rb]/content:
>>>  
>>> content changed '{md5}46b2a0004e0245c577974e7a645e08f7' to 
>>> '{md5}1b06628868826a8ea64744a7ae8ec8da'
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/type]/mode: 
>>> mode changed '0775' to '0755'
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/type/netapp_volume.rb]/content:
>>>  
>>> content changed '{md5}ebe14c73783c97063d9b6ae0bc791896' to 
>>> '{md5}2fb244482c7d760e6cc132f104be619d'
>>> /File[/var/lib/puppet/devices/actint-star-nactl01/lib/puppet/util/network_device/netapp/facts.rb]/content:
>>>  
>>> content changed '{md5}c7e59e79e19486cba9ae7e5314b2a061' to 
>>> '{md5}b0c912dc663d5251219bbad

[Puppet Users] Re: Custom Type & Invalid Parameter...

2012-11-07 Thread Gavin Williams
Hmm... It seems that all that was needed was a Puppetmaster restart :s

Now happily creating volumes... 

Cheers
Gavin 

On Wednesday, 7 November 2012 10:46:55 UTC, Gavin Williams wrote:
>
> Hi All
>
> As per my various other Posts, I'm writing a customer type and provider 
> set for NetApp support.. 
>
> My current problem is that the 'puppet device -v' run keeps failing with:
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
>> Invalid parameter aggregate at /etc/puppet/manifests/site.pp:30 on node 
>> actint-star-nactl01
>>
>
> Now as far as I can see, the parameter is defined correctly in the 
> manifest and the type:
> Manifest:
>
>> # Test NetApp volume provider
>> netapp_volume { 'v_puppet_test':
>> ensure => present,
>> initsize => "1g",
>> aggregate => "aggr01",
>> spaceres => "none",
>> }
>>
>
>  Type:
>
>> Puppet::Type.newtype(:netapp_volume) do
>>   @doc = "Manage Netapp Volume creation, modification and deletion."
>>
>>   apply_to_device
>>
>>   ensurable do
>> desc "Netapp Volume resource state. Valid values are: present, 
>> absent."
>>
>> defaultto(:present)
>>
>> newvalue(:present) do
>>   provider.create
>> end
>>
>> newvalue(:absent) do
>>   provider.destroy
>> end
>>   end
>>
>>   newparam(:name) do
>> desc "The volume name."
>> isnamevar
>>   end
>>
>>   newparam(:initsize) do
>> desc "The initial volume size."
>> defaultto "1g"
>>   end
>>
>>   newparam(:aggregate) do
>> desc "The aggregate this volume should be created in."
>>   end
>>
>>   newparam(:spaceres) do
>> desc "The space reservation mode."
>>   end
>> end
>>
>
>  Provider does some debugging logging within the create and exists? as 
> follows: 
>
>> ... 
>
> def create
>> Puppet.debug("Puppet::Provider::Netapp_volume: creating Netapp Volume 
>> #{@resource[:name]} of initial size #{@resource[:initsize]} in Aggregate 
>> #{@resource[:aggregate]} using space reserve of #{@resource[:spaceres]}.")
>> ..
>>
>   def exists?
>> Puppet.debug("Puppet::Provider::Netapp_volume: checking existance of 
>> Netapp Volume #{@resource[:name]}")
>> result = transport.invoke("volume-list-info", "volume", 
>> @resource[:name])
>> Puppet.debug("Puppet::Provider::Netapp_volume: Vol Info: " + 
>> result.sprintf() + "\n")
>> if(result.results_status == "failed")
>>   Puppet.debug("Puppet::Provider::Netapp_volume: Volume doesn't 
>> currently exist. \n")
>>   return false
>> else
>>   Puppet.debug("Puppet::Provider::Netapp_volume: Volume already 
>> exists. \n")
>>   return true
>> end
>>
>>   end
>> ... 
>>
>
> When running puppet device in debug mode, get the following log entries:
>
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance of 
>> Netapp Volume v_puppet_test
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info: > status="failed" reason="No volume named 'v_puppet_test' exists" 
>> errno="13040">
>>
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't 
>> currently exist.
>> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
>> Volume v_puppet_test of initial size 1g in Aggregate  using space reserve 
>> of .
>>
>
> So I'm seeing values against name and initsize params, but not against 
> aggregate or spaceres... 
>
> Any ideas???
>
> Cheers
> Gavin 
>
> PS: Full Git code is available here: 
> https://github.com/fatmcgav/fatmcgav-netapp
>

-- 
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/-/LOBOFAEmNugJ.
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] How to configure puppet so that it installs yum repos with debug mode?

2012-11-07 Thread Imdad Ahmed
I have also posted this q at 
SO: 
http://stackoverflow.com/questions/13268846/how-to-configure-puppet-so-that-it-installs-yum-repos-with-debug-mode

Quote:

When i run *puppet apply*, it tries to install packages using the following 
command:

/usr/bin/yum -d 0 -e 0 -y install couchdb-1.2.0-7.el6

How can i configure so that it runs it as following instead:

/usr/bin/yum -y install couchdb-1.2.0-7.el6

That is, without removing the debug logs?

-- 
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/-/JT15Gy8ZsegJ.
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] Config Sync

2012-11-07 Thread John Macleod
What I am looking to do is use Puppet to automatically sync a handful of 
application configuration files between distributed servers, and bounce 
(reload) the applicable service.

Forgive me for asking a question that is covered somewhere, however I did 
my best homework on the topic and found numerous posts to suggest Puppet 
for this, but no real world examples of how to do it.

Thanks in advance!

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/-/4XQlkYxDmg8J.
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: Can Puppet alert about dead nodes?

2012-11-07 Thread Greg Sutcliffe
This post to the list concerns PuppetLabs ceasing development on Dashboard
-
https://groups.google.com/forum/#!msg/puppet-users/j44EbTJY7HI/EQSJgh-g1fgJ

A few people have expressed interest in taking Dashboard on, but I've seen
no announcement that this has officially happened. Perhaps I missed it
though... I'd love to be corrected if so.

Greg

-- 
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] Custom Type & Invalid Parameter...

2012-11-07 Thread Gavin Williams
Hi All

As per my various other Posts, I'm writing a customer type and provider set 
for NetApp support.. 

My current problem is that the 'puppet device -v' run keeps failing with:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Invalid parameter aggregate at /etc/puppet/manifests/site.pp:30 on node 
> actint-star-nactl01
>

Now as far as I can see, the parameter is defined correctly in the manifest 
and the type:
Manifest:

> # Test NetApp volume provider
> netapp_volume { 'v_puppet_test':
> ensure => present,
> initsize => "1g",
> aggregate => "aggr01",
> spaceres => "none",
> }
>

 Type:

> Puppet::Type.newtype(:netapp_volume) do
>   @doc = "Manage Netapp Volume creation, modification and deletion."
>
>   apply_to_device
>
>   ensurable do
> desc "Netapp Volume resource state. Valid values are: present, absent."
>
> defaultto(:present)
>
> newvalue(:present) do
>   provider.create
> end
>
> newvalue(:absent) do
>   provider.destroy
> end
>   end
>
>   newparam(:name) do
> desc "The volume name."
> isnamevar
>   end
>
>   newparam(:initsize) do
> desc "The initial volume size."
> defaultto "1g"
>   end
>
>   newparam(:aggregate) do
> desc "The aggregate this volume should be created in."
>   end
>
>   newparam(:spaceres) do
> desc "The space reservation mode."
>   end
> end
>

 Provider does some debugging logging within the create and exists? as 
follows: 

> ... 

def create
> Puppet.debug("Puppet::Provider::Netapp_volume: creating Netapp Volume 
> #{@resource[:name]} of initial size #{@resource[:initsize]} in Aggregate 
> #{@resource[:aggregate]} using space reserve of #{@resource[:spaceres]}.")
> ..
>
  def exists?
> Puppet.debug("Puppet::Provider::Netapp_volume: checking existance of 
> Netapp Volume #{@resource[:name]}")
> result = transport.invoke("volume-list-info", "volume", 
> @resource[:name])
> Puppet.debug("Puppet::Provider::Netapp_volume: Vol Info: " + 
> result.sprintf() + "\n")
> if(result.results_status == "failed")
>   Puppet.debug("Puppet::Provider::Netapp_volume: Volume doesn't 
> currently exist. \n")
>   return false
> else
>   Puppet.debug("Puppet::Provider::Netapp_volume: Volume already 
> exists. \n")
>   return true
> end
>
>   end
> ... 
>

When running puppet device in debug mode, get the following log entries:

^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: checking existance of 
> Netapp Volume v_puppet_test
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Vol Info:  status="failed" reason="No volume named 'v_puppet_test' exists" 
> errno="13040">
>
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: Volume doesn't 
> currently exist.
> ^[[0;36mDebug^[[0m: Puppet::Provider::Netapp_volume: creating Netapp 
> Volume v_puppet_test of initial size 1g in Aggregate  using space reserve 
> of .
>

So I'm seeing values against name and initsize params, but not against 
aggregate or spaceres... 

Any ideas???

Cheers
Gavin 

PS: Full Git code is available here: 
https://github.com/fatmcgav/fatmcgav-netapp

-- 
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/-/t4mmy5XzYVkJ.
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 & JBoss

2012-11-07 Thread j4m3s
Budicom

I had the same problem with JBoss, and (following advice I read on this 
group) looked into creating my own deb.  It turned out to be amazingly 
straightforward using a bit of software that's been discussed on here 
before (fpm: https://github.com/jordansissel/fpm).
I now have my own deb installers (created by fpm) for JBoss and even the 
wars and ears that are deployed in jboss (that way you can manage the 
version numbers easily too).  

Give yourself a half day to get into fpm and you'll never look back.

James

On Tuesday, November 6, 2012 11:09:17 PM UTC, yersinia.spiros wrote:
>
> Sorry for the top posting. 
>
> So, configuration and package management are different problem: trying 
> to solve a problem with a tool born for solving the other problem can 
> have, in the short or long run, some issue. 
> Ymmv, as everyone else. 
>
>
> Best 
>
> 2012/11/6, Alan Evans >: 
> > Budicom, 
> > 
> > One thing I might suggest is not to put the entire JBoss directory in 
> > puppet and realize it as a file resource.  As gross as it is for a 
> > former employer I used the zip deployment and extracted the zip file. 
> > 
> > Disclaimer: No syntax checking, no validation YMMV, for example only. :) 
> > 
> > file { "$somepath/jboss-$version.zip": 
> >   ensure => 'present', 
> >   source => $somewhere, 
> > } 
> > 
> > exec { "unzip-jboss-$version.zip": 
> >   command => "unzip $somepath/jboss-$version.zip -q -d $someotherdir", 
> >   requires => [ File["$somepath/jboss-$version.zip", Package['zip'] ], 
> > } 
> > 
> > exec { "backup-jboss-$version-profiles": 
> >   command => "mv $someotherdir/jboss-$version/server/ 
> > $someotherdir/jboss-$version/server.orig", 
> >   creates => "$someotherdir/jboss-$version/server.orig", 
> >   requires => "unzip-jboss-$version.zip", 
> > } 
> > 
> > class jboss::instance ( 
> >   installdir = undef, 
> >   profile = 'default', 
> > ) { 
> >exec { "copy-jboss-profile-$name": 
> >   command => "cp $installdir/jboss-$version/server.orig/$profile 
> > $installdir/jboss-$version/server/$name" 
> >   creates => "$installdir/jboss-$version/server/$name" 
> >   } 
> > 
> >   # setup an init script 
> >   # configure other instance properties w/ augeas/files 
> > } 
> > 
> > Campt to camp has a great "archive" installer you could cannibalize or 
> > perhaps use in its entirety.  It didn't quite work in my last 
> > situation but perhaps it would work for you. 
> > 
> > https://github.com/camptocamp/puppet-archive 
> > 
> > Regards, 
> > -Alan 
> > 
> > 
> > On Tue, Nov 6, 2012 at 7:30 AM, Budicom > 
> wrote: 
> >> Hi, 
> >> 
> >> I have a big problem with Puppet and JBoss. 
> >> 
> >> In jboss/server/ directory, there are several instances. And instances 
> >> started, +10 files are presents. 
> >> 
> >> Puppetrun takes several hours to complete his cycle. 
> >> 
> >> tmp/ directory is ignore in file resource (ignore  => [ 'tmp', 'work', 
> >> 'data', '.git', '*puppet-bak', '*class', '*tld', '*jsp' ],) but this 
> >> directory is still processed. 
> >> 
> >> I don't understand. 
> >> 
> >> How to reduced execution time ? 
> >> 
> >> Thx. 
> >> 
> >> -- 
> >> 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/-/Z_sNqoE6xDcJ. 
> >> 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 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. 
> > 
> > 
>
> -- 
> Inviato dal mio dispositivo mobile 
>

-- 
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/-/83joHbRaWFwJ.
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: PuppetDB API permissions

2012-11-07 Thread ak0ska
We're still just getting familiar with PuppetDB, so at this point it's too 
early to say how fine grained we need this feature to be. We've already set 
up a proxy (as you recommended) and this solution suites us for now.

On Friday, October 26, 2012 8:56:26 PM UTC+2, Nick Lewis wrote:
>
> On Friday, October 26, 2012 7:24:18 AM UTC-7, ak0ska wrote:
>
>> Hello,
>>
>> Is it possible to control from which nodes is it allowed to execute 
>> commands like "replace catalog" and "replace facts", and which nodes can 
>> only do queries (but no changes)? It seems like once someone could access 
>> the service through http or https (depending on jetty.ini settings) can do 
>> both.
>>
>>
> Unfortunately, this isn't currently possible, though it's certainly 
> something we'd like to provide in the future. Currently the only 
> restriction that can be made is a whitelist of certnames which are allowed 
> to talk to the API, for both read and write alike.
>
> Until this is supported by PuppetDB itself, you could use a proxy to allow 
> only certain routes.
>
> If we were to add this feature, would it be sufficient to just have "no 
> access", "read access", and "read/write access" as categories, or would you 
> need something more granular than that (for instance, can query metrics but 
> not facts)?
>

-- 
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/-/qXDt2-87I4kJ.
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.