Hi All is in title ;-) I have to run multiples Bash commands. It is just for readability of the pp file. Thank Serge --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Jun 17, 2009 at 8:56 AM, serge.lelouarne@free.fr<serge.lelouarne@gmail.com> wrote:> > Hi > > All is in title ;-) > > I have to run multiples Bash commands. It is just for readability of > the pp file. > > Thank > SergeWhat are you trying to do? It sounds like you are trying to work against the way puppet operates. Evan --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I install blender ;-) My pp file (in actual state, I have no backup of previous versions) : class blender { file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2": owner => root, group => root, mode => 644, source => ''puppet:// formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2 ''} Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false, "tar -jxf /tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput => false, "cp -R /tmp/blender-2.49-linux-glibc236-py25-i386 /opt/":logoutput => false, "chmod -R 755 /opt/blender-2.49-linux-glibc236-py25-i386":logoutput => false, "cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender /home/serge/":logoutput => false, "chown -R serge:serge /home/serge/.blender":logoutput => false, unless => "test -d /home/serge/.blender" } } The "unless" statement isn''t follow by the puppet agent. The logs said that the 8th line is wrong : Puppet look for a "}" ... Thank Serge 2009/6/17 Evan Hisey <ehisey@gmail.com>> > On Wed, Jun 17, 2009 at 8:56 AM, > serge.lelouarne@free.fr<serge.lelouarne@gmail.com> wrote: > > > > Hi > > > > All is in title ;-) > > > > I have to run multiples Bash commands. It is just for readability of > > the pp file. > > > > Thank > > Serge > What are you trying to do? It sounds like you are trying to work > against the way puppet operates. > > Evan > > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Serge LE LOUARNE wrote:> Hi, > > I install blender ;-) > > My pp file (in actual state, I have no backup of previous versions) : > > class blender { > file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2": > owner => root, > group => root, > mode => 644, > source => > ''puppet://formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2 > <http://formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2>''} > Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false, > "tar -jxf > /tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput => false, > "cp -R /tmp/blender-2.49-linux-glibc236-py25-i386 /opt/":logoutput > => false, > "chmod -R 755 /opt/blender-2.49-linux-glibc236-py25-i386":logoutput > => false, > "cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender > /home/serge/":logoutput => false, > "chown -R serge:serge /home/serge/.blender":logoutput => false, > unless => "test -d /home/serge/.blender" } > } > > The "unless" statement isn''t follow by the puppet agent. The logs said > that the 8th line is wrong : Puppet look for a "}" ...These are several independent exec commands that will be scheduled by puppet completely independently (that is not order-preserving). For this specific case, you might want to create a real shell script, put it on the server with file{} and execute it then with a single exec. Also, since you are specifying multiple resources, those need to be separated with semicolons (;) and not colons (,). Please go to http://reductivelabs.com/trac/puppet/wiki/DocumentationStart and start reading some of the docs there. Especially the LanguageTutorial and TypeReference. Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
> > Serge LE LOUARNE wrote: >> Hi, >> >> I install blender ;-) >> >> My pp file (in actual state, I have no backup of previous versions) : >> >> class blender { >> file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2": >> owner => root, >> group => root, >> mode => 644, >> source => >> ''puppet://formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2 >> <http://formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2>''} >> Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false, >> "tar -jxf >> /tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput => false, >> "cp -R /tmp/blender-2.49-linux-glibc236-py25-i386 /opt/":logoutput >> => false, >> "chmod -R 755 /opt/blender-2.49-linux-glibc236-py25-i386":logoutput >> => false, >> "cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender >> /home/serge/":logoutput => false, >> "chown -R serge:serge /home/serge/.blender":logoutput => false, >> unless => "test -d /home/serge/.blender" } >> } >> >> The "unless" statement isn''t follow by the puppet agent. The logs said >> that the 8th line is wrong : Puppet look for a "}" ... > > These are several independent exec commands that will be scheduled by > puppet completely independently (that is not order-preserving). For this > specific case, you might want to create a real shell script, put it on > the server with file{} and execute it then with a single exec. > > Also, since you are specifying multiple resources, those need to be > separated with semicolons (;) and not colons (,). > > Please go to > http://reductivelabs.com/trac/puppet/wiki/DocumentationStart and start > reading some of the docs there. Especially the LanguageTutorial and > TypeReference. > > > Regards, DavidS >As DavidS said, or make a nice .deb for blender use apt. Using puppet below 0.25.0 is probable going to be painfully slow moving a file the size of the blender tar.bz to any large number of machines. evan --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Serge, If you want to do it this way, I would ditch the file type and do it all in an exec: define install_blender ( $version, $server ) { exec { "snarf_blender_$version": command =>"wget -O /tmp/blender_$version.tar.gz http://$server/blender_$version.tar.gz; Just write the rest of your shell script; normally here;", onlyif => "test ! -f /tmp/blender_$version.tar.gz" } Good luck! Trevor On Thu, Jun 18, 2009 at 02:39, Serge LE LOUARNE<serge.lelouarne@gmail.com> wrote:> Hi, > > I install blender ;-) > > My pp file (in actual state, I have no backup of previous versions) : > > class blender { > file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2": > owner => root, > group => root, > mode => 644, > source => > ''puppet://formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2''} > Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false, > "tar -jxf /tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput > => false, > "cp -R /tmp/blender-2.49-linux-glibc236-py25-i386 /opt/":logoutput => > false, > "chmod -R 755 /opt/blender-2.49-linux-glibc236-py25-i386":logoutput => > false, > "cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender > /home/serge/":logoutput => false, > "chown -R serge:serge /home/serge/.blender":logoutput => false, > unless => "test -d /home/serge/.blender" } > } > > The "unless" statement isn''t follow by the puppet agent. The logs said that > the 8th line is wrong : Puppet look for a "}" ... > > Thank > Serge > > 2009/6/17 Evan Hisey <ehisey@gmail.com> >> >> On Wed, Jun 17, 2009 at 8:56 AM, >> serge.lelouarne@free.fr<serge.lelouarne@gmail.com> wrote: >> > >> > Hi >> > >> > All is in title ;-) >> > >> > I have to run multiples Bash commands. It is just for readability of >> > the pp file. >> > >> > Thank >> > Serge >> What are you trying to do? It sounds like you are trying to work >> against the way puppet operates. >> >> Evan >> >> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
If this has already been mentioned in this thread i''m sorry (or if you''re not using an apt/yum capable system), but doesn''t it seem simpler to learn how to create a package of this and then you can simply use the package facility: package { $blender_current: ensure => installed } best regards, michael From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of Trevor Vaughan Serge, If you want to do it this way, I would ditch the file type and do it all in an exec: define install_blender ( $version, $server ) { exec { "snarf_blender_$version": command =>"wget -O /tmp/blender_$version.tar.gz http://$server/blender_$version.tar.gz; Just write the rest of your shell script; normally here;", onlyif => "test ! -f /tmp/blender_$version.tar.gz" } Good luck! Trevor On Thu, Jun 18, 2009 at 02:39, Serge LE LOUARNE<serge.lelouarne@gmail.com> wrote:> Hi, > > I install blender ;-) > > My pp file (in actual state, I have no backup of previous versions) : > > class blender { > file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2": > owner => root, > group => root, > mode => 644, > source => >''puppet://formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25 -i386.tar.bz2''}> Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false, > "tar -jxf/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput> => false, > "cp -R /tmp/blender-2.49-linux-glibc236-py25-i386/opt/":logoutput =>> false, > "chmod -R 755/opt/blender-2.49-linux-glibc236-py25-i386":logoutput =>> false, > "cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender > /home/serge/":logoutput => false, > "chown -R serge:serge /home/serge/.blender":logoutput => false, > unless => "test -d /home/serge/.blender" } > } > > The "unless" statement isn''t follow by the puppet agent. The logs saidthat> the 8th line is wrong : Puppet look for a "}" ... > > Thank > Serge > > 2009/6/17 Evan Hisey <ehisey@gmail.com> >> >> On Wed, Jun 17, 2009 at 8:56 AM, >> serge.lelouarne@free.fr<serge.lelouarne@gmail.com> wrote: >> > >> > Hi >> > >> > All is in title ;-) >> > >> > I have to run multiples Bash commands. It is just for readabilityof>> > the pp file. >> > >> > Thank >> > Serge >> What are you trying to do? It sounds like you are trying to work >> against the way puppet operates. >> >> Evan >> >> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
hi, Yes, a script is the better wat to do that. I know the wiki, but i have some difficulties to understand the docs (I don''t read/write Easily english language ;-) ), so, i try Puppet step vy step : - I know how transfer a file, - I can make little change on a files (rigth, owner ...), - I can exec some little command line. But, i''m not a power user ;-) Tha,ks Serge 2009/6/18 David Schmitt <david@dasz.at>> > [...] > > > These are several independent exec commands that will be scheduled by > puppet completely independently (that is not order-preserving). For this > specific case, you might want to create a real shell script, put it on > the server with file{} and execute it then with a single exec. > > Also, since you are specifying multiple resources, those need to be > separated with semicolons (;) and not colons (,). > > Please go to > http://reductivelabs.com/trac/puppet/wiki/DocumentationStart and start > reading some of the docs there. Especially the LanguageTutorial and > TypeReference. > > > Regards, DavidS > > > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I''ll try this as sonn as possible. It seem powerful ! Thanks Serge 2009/6/19 Trevor Vaughan <peiriannydd@gmail.com>> > Serge, > > If you want to do it this way, I would ditch the file type and do it > all in an exec: > > define install_blender ( $version, $server ) { > exec { "snarf_blender_$version": > command =>"wget -O /tmp/blender_$version.tar.gz > http://$server/blender_$version.tar.gz; > Just write the rest of your shell script; > normally here;", > onlyif => "test ! -f /tmp/blender_$version.tar.gz" > } > > Good luck! > > Trevor > > On Thu, Jun 18, 2009 at 02:39, Serge LE > LOUARNE<serge.lelouarne@gmail.com> wrote: > > Hi, > > > > I install blender ;-) > > > > My pp file (in actual state, I have no backup of previous versions) : > > > > class blender { > > file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2": > > owner => root, > > group => root, > > mode => 644, > > source => > > ''puppet:// > formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2 > ''} > > Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false, > > "tar -jxf > /tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput > > => false, > > "cp -R /tmp/blender-2.49-linux-glibc236-py25-i386 /opt/":logoutput > => > > false, > > "chmod -R 755 /opt/blender-2.49-linux-glibc236-py25-i386":logoutput > => > > false, > > "cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender > > /home/serge/":logoutput => false, > > "chown -R serge:serge /home/serge/.blender":logoutput => false, > > unless => "test -d /home/serge/.blender" } > > } > > > > The "unless" statement isn''t follow by the puppet agent. The logs said > that > > the 8th line is wrong : Puppet look for a "}" ... > > > > Thank > > Serge > > > > 2009/6/17 Evan Hisey <ehisey@gmail.com> > >> > >> On Wed, Jun 17, 2009 at 8:56 AM, > >> serge.lelouarne@free.fr<serge.lelouarne@gmail.com> wrote: > >> > > >> > Hi > >> > > >> > All is in title ;-) > >> > > >> > I have to run multiples Bash commands. It is just for readability of > >> > the pp file. > >> > > >> > Thank > >> > Serge > >> What are you trying to do? It sounds like you are trying to work > >> against the way puppet operates. > >> > >> Evan > >> > >> > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, The systems (Ubuntu and Gentoo based) can support package, but, like I said before, I try to learn Puppet and i explore it ;-) The "problem" is that the systems are highly modified, and we need a tool highly "scalable" to maintain our servers. thanks for the piece of code, i''ll tru it when i will try the "define" statement Serge 2009/6/19 Marziani, Michael <michael.marziani@globalfoundries.com>> > If this has already been mentioned in this thread i''m sorry (or if > you''re not using an apt/yum capable system), but doesn''t it seem simpler > to learn how to create a package of this and then you can simply use the > package facility: > > package { $blender_current: ensure => installed } > > best regards, > > michael > > [...] >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---