Re: [Puppet Users] Re: Using puppet to import database on client side

2011-07-16 Thread Gabriel Filion
On 11-07-15 02:47 PM, newguy wrote:
 exec {Get db:
 command = /usr/bin/mysql -uroot -proot papa 
 dumpfile.sql,
 require = exec[Retrieve dump],
 }

if your .sql file name is written in a similar fashion in your manifests
it probably errors out because it doesn't find it. try using an absolute
path to your dump file.

e.g.:

exec {Get db:
command = /usr/bin/mysql -uroot -proot papa 
/var/backups/mysql/dumpfile.sql,
require = exec[Retrieve dump],
}

-- 
Gabriel Filion

-- 
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: Using puppet to import database on client side

2011-07-16 Thread newguy
It worked thanks forth help guys. Problem was not of dump file its
that on client machine password was misspelt.
Thanks anyways.

On Jul 16, 1:33 am, Gabriel Filion lelu...@gmail.com wrote:
 On11-07-15 02:47 PM, newguy wrote:

  exec {Get db:
                  command = /usr/bin/mysql -uroot -proot papa 
  dumpfile.sql,
                  require = exec[Retrieve dump],
          }

 if your .sql file name is written in a similar fashion in your manifests
 it probably errors out because it doesn't find it. try using an absolute
 path to your dump file.

 e.g.:

 exec {Get db:
                 command = /usr/bin/mysql -uroot -proot papa 
 /var/backups/mysql/dumpfile.sql,
                 require = exec[Retrieve dump],
         }

 --
 Gabriel Filion

-- 
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: What is the best practice to clean up installed components on a node?

2011-07-16 Thread Emiliano Gabrielli (aka AlberT)

On Jul 14, 2011, at 7:16 PM, Darrell Fuhriman wrote:

 'm not asking puppet to know what to do, which I agree is ridiculous. I'm 
 saying that if and only if I've defined X::disabled, automatically run it on 
 every host which does not include X. If X::disabled isn't defined, then don't 
 do anything.  Probably a better way to think of it instead of X::disabled is 
 that for ever class X there is an implicitly defined not-X class, which is 
 empty until I define it. For example:
 
 class webserver {
   package {apache: ensure = installed}
   service {apache: ensure = running}
 }
 class !webserver {
   package {apache: ensure = absent}
 }
 class dnsserver {
   [...]
 }


I like this approach!

-- 
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: Using puppet to import database on client side

2011-07-16 Thread Stefan Schulte
On Fri, Jul 15, 2011 at 11:17:40AM -0700, newguy wrote:
 Yes I did that and got the following error:
 change from notrun to 0 failed: /usr/bin/mysql -uroot -pring parasol 
 download.php?i=hV0wsTfa returned 1 instead of one of [0] at /etc/
 puppet/environments/ss/modules/vim/manifests/init.pp:29
 
 This is my exec:
 
 exec {Get db:
   command = /usr/bin/mysql -uroot -pring parasol  download.php?
 i=hV0wsTfa,
   require = exec[Retrieve dump],
   }
 
 
 Please help

Well it meanst that you command exited with an exit code of 1 instead of
0. So the easiest way to debug this is to run the command by hand in a
shell

# /usr/bin/mysql -uroot -pring parasol  download.php?i=hV0wsTf
# echo $?

Is download.php?i=hV0wsTf really the filename? I would also suggest to
provide the full path to the inputfile because you never know where
someone runs puppet (or provide the cwd parameter to switch to the
desired directory first)

-Stefan

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



Re: [Puppet Users] Re: What is the best practice to clean up installed components on a node?

2011-07-16 Thread Scott Smith
I don't.
On Jul 16, 2011 8:59 AM, Emiliano Gabrielli (aka AlberT) 
emiliano.gabrie...@gmail.com wrote:

 On Jul 14, 2011, at 7:16 PM, Darrell Fuhriman wrote:

 'm not asking puppet to know what to do, which I agree is ridiculous. I'm
saying that if and only if I've defined X::disabled, automatically run it on
every host which does not include X. If X::disabled isn't defined, then
don't do anything. Probably a better way to think of it instead of
X::disabled is that for ever class X there is an implicitly defined not-X
class, which is empty until I define it. For example:

 class webserver {
 package {apache: ensure = installed}
 service {apache: ensure = running}
 }
 class !webserver {
 package {apache: ensure = absent}
 }
 class dnsserver {
 [...]
 }


 I like this approach!

 --
 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] Re: Puppet 2.7.x and Facter 1.6 packages for Redhat/CentOS 5

2011-07-16 Thread treydock
I've begun using the spec file provided in the puppet and facter
sources to build my own RPMs.  So far to make the provided work with
2.7.1, I've made these changes...

The addition of ruby-shadow requirement and the namespace-auth.conf
are not necessary.  I added ruby-shadow to force it always installed
and the namespace-auth.conf may no longer be necessary with 2.7.1, but
was for as far up as 2.6.8.

$ diff -u puppet.spec.orig
puppet.spec
--- puppet.spec.orig2011-07-16 12:51:01.0 -0500
+++ puppet.spec 2011-07-11 17:19:20.0 -0500
@@ -5,8 +5,8 @@
 %global confdir conf/redhat

 Name:   puppet
-Version:2.6.0
+Version:2.7.1
 Release:1%{?dist}
 Summary:A network tool for managing many disparate systems
 License:Apache 2.0
 URL:http://puppetlabs.com
@@ -25,6 +25,8 @@
 Requires:   ruby(abi) = 1.8
 Requires:   ruby-shadow
 %endif
+Requires:   ruby-shadow

 # Pull in ruby selinux bindings where available
 %if 0%{?fedora} = 12 || 0%{?rhel} = 6
@@ -105,6 +107,9 @@
 install -Dp -m0644 conf/auth.conf %{buildroot}%{_sysconfdir}/puppet/
auth.conf
 install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/
logrotate.d/puppet

+# Create empty namespaceauth.conf file
+touch %{buildroot}%{_sysconfdir}/puppet/namespaceauth.conf
+
 # We need something for these ghosted files, otherwise rpmbuild
 # will complain loudly. They won't be included in the binary packages
 touch %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf
@@ -130,7 +135,7 @@

 %files
 %defattr(-, root, root, 0755)
-%doc CHANGELOG COPYING LICENSE README README.queueing examples
+%doc CHANGELOG README.md
 %{_bindir}/pi
 %{_bindir}/puppet
 %{_bindir}/ralsh
@@ -144,6 +149,7 @@
 %config(noreplace) %{_sysconfdir}/sysconfig/puppet
 %config(noreplace) %{_sysconfdir}/puppet/puppet.conf
 %config(noreplace) %{_sysconfdir}/puppet/auth.conf
+%config(noreplace) %{_sysconfdir}/puppet/namespaceauth.conf
 %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/
puppetca.conf
 %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/
puppetd.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/puppet
@@ -163,6 +169,7 @@
 %{_mandir}/man8/puppetd.8.gz
 %{_mandir}/man8/ralsh.8.gz
 %{_mandir}/man8/puppetdoc.8.gz
+%{_mandir}/man8/puppet-*

 %files server
 %defattr(-, root, root, 0755)

Michael would you be the person to contact about assisting with
maintaining the puppet RPMs for puppet?  I could also probably
contribute a few other packages

 - Trey

On Jul 14, 7:25 pm, Michael Stahnke stah...@puppetlabs.com wrote:
 I have builds of facter 1.6 and puppet 2.7.2 for EL 5 and 6  available

 http://stahnma.fedorapeople.org/puppetlabs/

 I'm working on Fedora 14/15 builds currently also.

 These also are not currently signed, and there is no stahnma-repo rpm
 or anything like that.  I'm basically just trying scratch an itch a
 few people have.

 This won't be a permanent location.  We are working on updating and
 official puppet labs repository as well.

 Mike

-- 
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 2.7.x and Facter 1.6 packages for Redhat/CentOS 5

2011-07-16 Thread treydock
I've begun using the spec file provided in the puppet and facter
sources to build my own RPMs.  So far to make the provided work with
2.7.1, I've made these changes...
The addition of ruby-shadow requirement and the namespace-auth.conf
are not necessary.  I added ruby-shadow to force it always installed
and the namespace-auth.conf may no longer be necessary with 2.7.1,
but
was for as far up as 2.6.8.
$ diff -u puppet.spec.orig
puppet.spec
--- puppet.spec.orig2011-07-16 12:51:01.0 -0500
+++ puppet.spec 2011-07-11 17:19:20.0 -0500
@@ -5,8 +5,8 @@
 %global confdir conf/redhat
 Name:   puppet
-Version:2.6.0
+Version:2.7.1
 Release:1%{?dist}
 Summary:A network tool for managing many disparate systems
 License:Apache 2.0
 URL:http://puppetlabs.com
@@ -25,6 +25,8 @@
 Requires:   ruby(abi) = 1.8
 Requires:   ruby-shadow
 %endif
+Requires:   ruby-shadow
 # Pull in ruby selinux bindings where available
 %if 0%{?fedora} = 12 || 0%{?rhel} = 6
@@ -105,6 +107,9 @@
 install -Dp -m0644 conf/auth.conf %{buildroot}%{_sysconfdir}/puppet/
auth.conf
 install -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/
logrotate.d/puppet
+# Create empty namespaceauth.conf file
+touch %{buildroot}%{_sysconfdir}/puppet/namespaceauth.conf
+
 # We need something for these ghosted files, otherwise rpmbuild
 # will complain loudly. They won't be included in the binary
packages
 touch %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf
@@ -130,7 +135,7 @@
 %files
 %defattr(-, root, root, 0755)
-%doc CHANGELOG COPYING LICENSE README README.queueing examples
+%doc CHANGELOG README.md
 %{_bindir}/pi
 %{_bindir}/puppet
 %{_bindir}/ralsh
@@ -144,6 +149,7 @@
 %config(noreplace) %{_sysconfdir}/sysconfig/puppet
 %config(noreplace) %{_sysconfdir}/puppet/puppet.conf
 %config(noreplace) %{_sysconfdir}/puppet/auth.conf
+%config(noreplace) %{_sysconfdir}/puppet/namespaceauth.conf
 %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/
puppetca.conf
 %ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/
puppetd.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/puppet
@@ -163,6 +169,7 @@
 %{_mandir}/man8/puppetd.8.gz
 %{_mandir}/man8/ralsh.8.gz
 %{_mandir}/man8/puppetdoc.8.gz
+%{_mandir}/man8/puppet-*
 %files server
 %defattr(-, root, root, 0755)

Who would be the person to contact about assisting with maintaining
the puppet RPMs for EPEL or whoever else provides a public puppet
RPM?

- Trey

On Jul 14, 7:25 pm, Michael Stahnke stah...@puppetlabs.com wrote:
 I have builds of facter 1.6 and puppet 2.7.2 for EL 5 and 6  available

 http://stahnma.fedorapeople.org/puppetlabs/

 I'm working on Fedora 14/15 builds currently also.

 These also are not currently signed, and there is no stahnma-repo rpm
 or anything like that.  I'm basically just trying scratch an itch a
 few people have.

 This won't be a permanent location.  We are working on updating and
 official puppet labs repository as well.

 Mike

-- 
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: What is the best practice to clean up installed components on a node?

2011-07-16 Thread Nigel Kersten
 I actually wish puppet had a 'confine' parameter for classes like it does 
 for custom facts. It would make it easier to avoid shooting yourself in the 
 foot.

Wishes don't get anyone anywhere.

Filed feature requests do however ;)

We've had a few conversations in the past about extending confine to
classes as well. It's a reasonably natural syntax for certain use
cases.


   class foo {
     confine $kernel = ['Linux', 'Darwin']
   }


 I wouldn't have a problem with that, but you can accomplish the same
 thing now with a conditional around the whole class body.

jcbollinger has done a great job outlining the problems that this
automatic disabled-inclusion suggestion poses, and indeed the
conceptual problems with the underlying desire itself.

If you *really* want this you could implement it reasonably easily in
a custom external node classifier, but it's rather unlikely this would
make it into core.

-- 
Nigel Kersten
Product Manager, Puppet Labs

Join us for PuppetConf
http://www.bit.ly/puppetconfsig
Sept 22/23 Portland, Oregon, USA.

-- 
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: Run this only once!!

2011-07-16 Thread Nigel Kersten
On Fri, Jul 15, 2011 at 7:34 AM, vella1tj vella...@gmail.com wrote:
 the errors are:

 err: //Package[Bindscript20100601.dmg]/ensure: change from absent to
 present failed: Execution of '/usr/bin/hdiutil mount -plist -nobrowse -
 readonly -noidme -mountrandom /tmp /Users/vella1tj/Desktop/
 Bindscript2010601.dmg' returned 1: hdiutil: mount failed - Resource
 temporarily unavailable

Can you download the dmg and mount it using the same command?

That looks like either a corrupt dmg or a (possibly temporary) issue
with the disk mounting framework to me.




 notice: //Exec[blahblah]: Dependency package[Bindscript20100601.dmg]
 has 1 failures
 warning: //Exec[blahblah]: Skipping because of failed dependencies

 On Jul 15, 10:23 am, vella1tj vella...@gmail.com wrote:
 After I ran that manifest, with this only

 #Package to install
 package { 'Bindscript20100601.dmg':
    provider    = pkgdmg,
    ensure      = installed,
    source      = '/etc/puppet/bindscript/files/
 Bindscript20100601.dmg',

 I am now receiving these errors and on the second error,
 Bindscript.dmg disappears as if it's deleting itself. I've created the
 dmg in disk utility in Mac osx.

 On Jul 12, 4:19 pm, vella1tj vella...@gmail.com wrote:







  Hi, I am trying run a package once and when it completes I want my
  manifest to create a touch file and from that file being placed there
  it will not run again. I have this so far, but have been running into
  syntax problems/invalid parameters.

  #Package to install
   package { 'Bindscript20100601.dmg':
     provider    = pkgdmg,
     ensure      = installed,
     source      = 'temp/location/rightnow/Bindscript20100601.dmg',
     notify      = [Exec['blahblah']],
     onlyif      = test -e /var/db/.bindscript,}

    exec {'blahblah':
     command     ='touch /var/db/.bindscript',
     path        =['/usr/bin']

  }

  If you need more information please ask.

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





-- 
Nigel Kersten
Product Manager, Puppet Labs

Join us for PuppetConf
http://www.bit.ly/puppetconfsig
Sept 22/23 Portland, Oregon, USA.

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