[Puppet Users] Re: In lastest version of rabbitmqctl the "...done" line has been removed, which is causing errors:

2014-11-05 Thread Jerry Higgs
Module has been updated to use use -q flag instead of array slices.  This 
has been solved. 

On Wednesday, November 5, 2014 3:40:34 PM UTC-8, Jerry Higgs wrote:
>
> It appears that there is an error in: 
>
> puppetlabs-rabbitmq <https://github.com/puppetlabs/puppetlabs-rabbitmq> / 
> lib <https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib> / 
> puppet 
> <https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib/puppet> 
> / provider 
> <https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib/puppet/provider>
>  
> / rabbitmq_vhost 
> <https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib/puppet/provider/rabbitmq_vhost>
>  
> / *rabbitmqctl.rb* 
>
>
> On Wednesday, November 5, 2014 12:40:08 PM UTC-8, Jerry Higgs wrote:
>>
>> In lastest version of rabbitmqctl the "...done" line has been removed, 
>> which is causing errors: 
>>
>> In the rabbitmq provider they currently use:
>> rabbitmqctl('list_vhosts').split(/\n/)[1..-2]
>> *Before:*
>> # rabbitmqctl list_vhosts
>> Listing vhosts ...
>> /
>> /mcollective 
>> ...done.
>>
>> The provider needs to be updated to reflect the changes in rabbitmqctl:
>> rabbitmqctl('list_vhosts').split(/\n/)[1..-1]
>> *Now:*
>> # rabbitmqctl list_vhosts
>> Listing vhosts ...
>> /
>> /mcollective
>>
>

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


[Puppet Users] Re: In lastest version of rabbitmqctl the "...done" line has been removed, which is causing errors:

2014-11-05 Thread Jerry Higgs
It appears that there is an error in: 

puppetlabs-rabbitmq <https://github.com/puppetlabs/puppetlabs-rabbitmq> / 
lib <https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib> / 
puppet 
<https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib/puppet> 
/ provider 
<https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib/puppet/provider>
 
/ rabbitmq_vhost 
<https://github.com/puppetlabs/puppetlabs-rabbitmq/tree/master/lib/puppet/provider/rabbitmq_vhost>
 
/ *rabbitmqctl.rb* 


On Wednesday, November 5, 2014 12:40:08 PM UTC-8, Jerry Higgs wrote:
>
> In lastest version of rabbitmqctl the "...done" line has been removed, 
> which is causing errors: 
>
> In the rabbitmq provider they currently use:
> rabbitmqctl('list_vhosts').split(/\n/)[1..-2]
> *Before:*
> # rabbitmqctl list_vhosts
> Listing vhosts ...
> /
> /mcollective 
> ...done.
>
> The provider needs to be updated to reflect the changes in rabbitmqctl:
> rabbitmqctl('list_vhosts').split(/\n/)[1..-1]
> *Now:*
> # rabbitmqctl list_vhosts
> Listing vhosts ...
> /
> /mcollective
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0c227e91-14b7-446f-83b6-702374ca1746%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] In lastest version of rabbitmqctl the "...done" line has been removed, which is causing errors:

2014-11-05 Thread Jerry Higgs
 

In lastest version of rabbitmqctl the "...done" line has been removed, 
which is causing errors: 

In the rabbitmq provider they currently use:
rabbitmqctl('list_vhosts').split(/\n/)[1..-2]
*Before:*
# rabbitmqctl list_vhosts
Listing vhosts ...
/
/mcollective 
...done.

The provider needs to be updated to reflect the changes in rabbitmqctl:
rabbitmqctl('list_vhosts').split(/\n/)[1..-1]
*Now:*
# rabbitmqctl list_vhosts
Listing vhosts ...
/
/mcollective

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


[Puppet Users] file_line stdlib not processing

2012-11-14 Thread Jerry Keen
I created a new manifest on a fedora 17 box using 
puppet-2.7.18-1.fc17.noarch and puppet-server, the same versions.



I installed stdlib to and created a manifest using about 60 lines such as 
below : 

file_line { "sysctl0": path =>'/etc/sysctl.conf', line => "#",}
file_line { "sysctl1": path =>'/etc/sysctl.conf', line => "#added by puppet 
config--`date`", require => File_line['sysctl0'],}
file_line { "sysctl2": path =>'/etc/sysctl.conf', line => "#", require => 
File_line['sysctl1'],}
file_line { "sysctl00": path =>'/etc/sysctl.conf', line => "# Controls IP 
packet forwarding", require => File_line['sysctl2'],}
file_line { "sysctl01": path =>'/etc/sysctl.conf', line => 
"net.ipv4.ip_forward = 0", require => File_line['sysctl00'],}

the module list is : 

recated in the future, use String#encode instead.
/etc/puppet/modules
└── puppetlabs-stdlib (v3.1.1)
/usr/share/puppet/modules (no modules installed)
[root@mercury ~]# 

This manifest works fine on Fedora..


When i attempted to run the manifest on  a redhat server running the 
following packages :

pe-puppet-enterprise-release-2.5.3-0.pe.el6.noarch
puppet-2.6.17-2.el6.noarch
pe-puppet-dashboard-1.2.7-11.pe.el6.noarch
pe-puppet-server-2.7.12-16.pe.el6.noarch
pe-puppet-dashboard-baseline-2.0.4-1.pe.el6.noarch
pe-rubygem-hiera-puppet-0.3.0-1.pe.el6.noarch
pe-puppet-2.7.12-16.pe.el6.noarch


here is the module list :

/etc/puppetlabs/puppet/modules
├── DavidSchmitt-common (v1.0.0)
├── base (???)
├── hosts (???)
├── limits (???)
├── ntp (???)
├── puppetlabs-motd (v1.0.1)
├── sss (???)
├── sssd (???)
├── sudo (???)
├── sysctl (???)
└── wfsudoers (???)
/opt/puppet/share/puppet/modules
├── puppetlabs-pe_accounts (v1.0.4)
├── puppetlabs-pe_compliance (v0.0.7)
├── puppetlabs-pe_mcollective (v0.0.54)
└── puppetlabs-stdlib (v3.1.1)


So when I run that manifest on the Redhat installation it does not seem to 
process the file_line items from the manifest..

Anyone have any suggestions?

Thanks,
Jerry

-- 
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/-/d5nL-ByzTNYJ.
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 exec issue with tar

2010-09-15 Thread jerry
Thanks Silviu, you was right, it is definitely a path problem with tar
and puppet seems to ignore the path (?)

I solved it by using gunzip and tar after another (piped):

  $unzip  = "/usr/bin/unzip"
  $tar= "/usr/sbin/tar"
  $bunzip = "/usr/bin/bunzip2"
  $gunzip = "/usr/bin/gunzip"

  $extractor = $pkg_format ? {
zip => "$unzip -q -d $cwd $cwd/$filename",
bzip=> "$bunzip -c $cwd/$filename | $tar -xf -",
default => "$gunzip < $cwd/$filename | $tar -xf -"
  }

  exec { "extract-$name":
cwd => "$cwd",
command => "$extractor",
timeout => 120, # 2 minutes
require => Exec["download-$name"],
  }

If anybody has a need for a build module, please feel free to download
it from github:

http://github.com/jfqd/puppet-module-build

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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 exec issue with tar

2010-09-14 Thread jerry
Thanks for your tip! Path is set early in base inheritance class to:

Exec { path => "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/
sbin:/sbin" }

But even if I set this path env var in the exec block it fails:

  # here I always get an error
  exec { "extract-$name":
cwd => "/usr/local/src",
command => "$extractor /usr/local/src/$filename",
timeout => 120,
path=> "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
sbin:/bin",
require => Exec["download-$name"],
  }

Adding:

loglevel  => verbose,
logoutput => true,

Doesn´t give any additional output. I´m a little loss with it...

On 14 Sep., 22:45, Silviu Paragina  wrote:
>   Check you environment path variable. Tar might not find something,
> most probably, the gzip executable (not 100% sure on this part). Usually
> if something doesn't work in specific cases, but it works in you bash
> console, you can make a safe bet on environment variables and/or running
> user.
>
> Silviu

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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 exec issue with tar

2010-09-14 Thread jerry
I do have a really strange issue with exec a tar command with puppet
2.6.0. If I run it with puppetmasterd I get the following error
message:

(//my.domain.net//Stage[main]/Workerzone/Build::Install[top]/
Exec[extract-top]/returns) change from notrun to 0 failed: /bin/bash -
c '/usr/sbin/tar -xzvf /usr/local/src/top-3.7.tar.gz' returned 1
instead of one of [0] at /etc/puppet/modules/build/manifests/init.pp:
58

If I run the code manually with 'puppetd -t --debug' there are no
errors. What am I doing wrong? Here is my code:

# build::install { 'top':
#   download => 'http://www.unixtop.org/dist/top-3.7.tar.gz',
#   creates  => '/url/local/bin/top',
# }

define build::install ($download, $creates, $pkg_folder='',
$pkg_format="tar", $pkg_extension="", $buildoptions="",
$rm_build_folder=true) {

  if defined( Package['build-essential'] ) {
debug("build-essential already installed")
  } else {
package { 'build-essential': ensure => installed }
  }

  $filename = basename($download)

  $extension = $pkg_format ? {
zip => ".zip",
tar => ".tar.gz",
bzip=> ".tar.bz2",
default => $pkg_extension,
  }

  $foldername = $pkg_folder ? {
''  => gsub($filename, $extension, ""),
default => $pkg_folder,
  }

  $extractor = $pkg_format ? {
zip => "/usr/bin/unzip -q -d /usr/local/src",
bzip=> "/usr/sbin/tar -xjf",
default => "/usr/sbin/tar -xzf" ,
  }

  # download is fine
  exec { "download-$name":
cwd => "/usr/local/src",
command => "/usr/bin/wget -q $download",
timeout => 120,
unless  => "test -f $creates",
  }

  # here I always get an error
  exec { "extract-$name":
cwd => "/usr/local/src",
command => "$extractor /usr/local/src/$filename",
timeout => 120,
path=> "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
sbin:/bin",
require => Exec["download-$name"],
  }

  exec { "config-$name":
cwd => "/usr/local/src/$foldername",
command => "./configure $buildoptions",
timeout => 120,
require => Exec["extract-$name"],
  }

  exec { "make-install-$name":
cwd => "/usr/local/src/$foldername",
command => "/usr/bin/make && /usr/bin/make install",
timeout => 600,
require => Exec["config-$name"],
  }

  # remove build folder
  case $rm_build_folder {
true: {
  notice("remove build folder")
  exec { "remove-$name-build-folder":
command => "/usr/bin/rm -rf /usr/local/src/$foldername",
require => Exec["make-install-$name"],
  } # exec
} # true
  } # case

}

The code runs on a nexenta ncp 3.0 (SunOS) box. Any ideas?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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.