lucas.brigida@ymail.com
2011-Jun-17 13:14 UTC
[Puppet Users] Problem in wordpress moodule.
Hi! I''m doing a module for the "puppet" for WordPress will implement. I''m having problems with this line: exec { "tar -vzxf ${downdir}wordpress.tar.gz": path => ["/usr/local/bin","/opt/local/bin","/usr/bin","/usr/sbin"], } And the error generated is this: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígida www.codebroken.wordpress.com -- 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.
Simple question, but does wordpress.tar.gz exist in /var/www/ ? I would expect that you would want your tar exec to depend on whatever is deploying the wordpress tar.gz file (another Exec or a File resource), so that you know it''s there before you try to use it. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, Jun 17, 2011 at 6:14 AM, lucas.brigida@ymail.com < grillobright@gmail.com> wrote:> Hi! > > I''m doing a module for the "puppet" for WordPress will implement. > > I''m having problems with this line: > > exec { "tar -vzxf ${downdir}wordpress.tar.gz": > path => > ["/usr/local/bin","/opt/local/bin","/usr/bin","/usr/sbin"], > } > > > And the error generated is this: > > err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf > /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar > -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at > /etc/puppet/modules/wordpress/manifests/install.pp:40 > > > > Can anyone help me? > > > > > > -- > Lucas Pereira Brígida > www.codebroken.wordpress.com > > -- > 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. >-- 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.
You should usually run the exec with: exec { "asdf": ... logoutput => on_failure, ... } This prints to screen any error. Anyway the clue for your case is in the error message: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 So trying to run it: tar -vzxf /var/www/wordpress.tar.gz echo $? Should tell you what is wrong. ken. On Fri, Jun 17, 2011 at 2:14 PM, lucas.brigida@ymail.com <grillobright@gmail.com> wrote:> Hi! > I''m doing a module for the "puppet" for WordPress will implement. > I''m having problems with this line: > > exec { "tar -vzxf ${downdir}wordpress.tar.gz": > path => > ["/usr/local/bin","/opt/local/bin","/usr/bin","/usr/sbin"], > } > > And the error generated is this: > > err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf > /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar > -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at > /etc/puppet/modules/wordpress/manifests/install.pp:40 > > Can anyone help me? > > > > > -- > Lucas Pereira Brígida > www.codebroken.wordpress.com > > -- > 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. >-- 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 06/17/2011 09:14 AM, lucas.brigida@ymail.com wrote:> Hi! > > I''m doing a module for the "puppet" for WordPress will implement. > > I''m having problems with this line: > > exec { "tar -vzxf ${downdir}wordpress.tar.gz": > path => > ["/usr/local/bin","/opt/local/bin","/usr/bin","/usr/sbin"], > } >1. make sure wordpress.tar.gz is on the machine before you try to untar it 2. put the x first: tar xzvf wordpress.tar.gz or you can do what I do and pipe that archive into tar: exec { "true $title && wget -O - $upstream | tar xzf - --xform ''s,wordpress/,,''": cwd => "$top", creates => "$top/license.txt", before => File[ "$top/setup.mysql" ], } the reason for the ''true $title &&'' part is that I want to be able to use this exec multiple times (it is in a defined class). So I need to get the $title in there so puppet doesn''t think it is a duplicate definition. OK, that''s confusing. the whole thing (wordpress, not the entire lamp stack) is in a tarfile attachement. Hope the list accepts it.> > And the error generated is this: > > err: /Stage[main]//Node[lucas.com.br > <http://lucas.com.br>]/Wordpress::Install[ ]/Exec[tar -vzxf > /var/www/wordpress.tar.gz]/returns: change from notrun to 0 > failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of > one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 > > > > Can anyone help me? > > > > > > -- > Lucas Pereira Brígida > www.codebroken.wordpress.com <http://www.codebroken.wordpress.com> -- > 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.-- 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 18.6.2011 05:30, vagn scott wrote:> or you can do what I do and pipe that archive into tar: > > exec { "true $title && wget -O - $upstream | tar xzf - --xform > ''s,wordpress/,,''": > cwd => "$top", > creates => "$top/license.txt", > before => File[ "$top/setup.mysql" ], > } > > the reason for the ''true $title &&'' part is > that I want to be able to use this exec multiple times (it is in a > defined class). > So I need to get the $title in there so puppet doesn''t think it is > a duplicate definition.You can separate the title from the actual command exec { "uniqe title maybe with $title in it": command => "wget...", ... } -- Kind Regards, Markus Falb
On 06/18/2011 10:31 AM, Markus Falb wrote:> On 18.6.2011 05:30, vagn scott wrote: > > >> or you can do what I do and pipe that archive into tar: >> >> exec { "true $title&& wget -O - $upstream | tar xzf - --xform >> ''s,wordpress/,,''": >> cwd => "$top", >> creates => "$top/license.txt", >> before => File[ "$top/setup.mysql" ], >> } >> >> the reason for the ''true $title&&'' part is >> that I want to be able to use this exec multiple times (it is in a >> defined class). >> So I need to get the $title in there so puppet doesn''t think it is >> a duplicate definition. >> > You can separate the title from the actual command > > exec { "uniqe title maybe with $title in it": > command => "wget...", > ... > } > >And then I have to make up a title that won''t collide with another title somewhere else. Also, I lose a line of vertical space on the screen, and I have to go looking for what the exec is doing, instead of it being on the first line. Shortcut operators don''t slow me down at all. Those are my tradeoffs, and why I chose this style. YMMV. But, since you mentioned it: Is it so arcane a practice that I should avoid it for the sake of people reading my code? -- vagn -- 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.
The main reason I separate title from namevar is so when I have references to the exec they stay consistent - but the command & args can be updated independently. This matters more when I have references that cross file boundaries. ken. On Sat, Jun 18, 2011 at 7:35 PM, vagn scott <vagnscott@gmail.com> wrote:> On 06/18/2011 10:31 AM, Markus Falb wrote: >> >> On 18.6.2011 05:30, vagn scott wrote: >> >> >>> >>> or you can do what I do and pipe that archive into tar: >>> >>> exec { "true $title&& wget -O - $upstream | tar xzf - --xform >>> ''s,wordpress/,,''": >>> cwd => "$top", >>> creates => "$top/license.txt", >>> before => File[ "$top/setup.mysql" ], >>> } >>> >>> the reason for the ''true $title&&'' part is >>> that I want to be able to use this exec multiple times (it is in a >>> defined class). >>> So I need to get the $title in there so puppet doesn''t think it is >>> a duplicate definition. >>> >> >> You can separate the title from the actual command >> >> exec { "uniqe title maybe with $title in it": >> command => "wget...", >> ... >> } >> >> > > And then I have to make up a title that won''t collide > with another title somewhere else. Also, I lose a line > of vertical space on the screen, and I have to go > looking for what the exec is doing, instead of it being > on the first line. Shortcut operators don''t slow me > down at all. Those are my tradeoffs, and why > I chose this style. YMMV. > > But, since you mentioned it: Is it so arcane a practice that > I should avoid it for the sake of people reading my code? > > -- > vagn > > -- > 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. > >-- 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.
lucas.brigida@ymail.com
2011-Jun-20 12:28 UTC
Re: [Puppet Users] Problem in wordpress moodule.
I could not do what you suggested at the weekend. I tried all the tips you gave me. But I could not fix. The file directory is specified, the problem is that it gives error unpacking, and when I run the tar command line manually, it works fine. Sorry for my English! -- 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.
Did you try the logouput => on_failure in the exec? Can you try that and run the content with the --debug flag so we can all see the output? (try putting the output in pastie.org if its a lot of information). ken. On Mon, Jun 20, 2011 at 1:28 PM, lucas.brigida@ymail.com <grillobright@gmail.com> wrote:> I could not do what you suggested at the weekend. > I tried all the tips you gave me. But I could not fix. > The file directory is specified, the problem is that it > gives error unpacking, and when I run the tar command line manually, it > works fine. > > Sorry for my English! > > -- > 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. >-- 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 Jun 18, 1:35 pm, vagn scott <vagnsc...@gmail.com> wrote:> On 06/18/2011 10:31 AM, Markus Falb wrote: > > > > > On 18.6.2011 05:30, vagn scott wrote: > > >> or you can do what I do and pipe that archive into tar: > > >> exec { "true $title&& wget -O - $upstream | tar xzf - --xform > >> ''s,wordpress/,,''": > >> cwd => "$top", > >> creates => "$top/license.txt", > >> before => File[ "$top/setup.mysql" ], > >> } > > >> the reason for the ''true $title&&'' part is > >> that I want to be able to use this exec multiple times (it is in a > >> defined class). > >> So I need to get the $title in there so puppet doesn''t think it is > >> a duplicate definition. > > > You can separate the title from the actual command > > > exec { "uniqe title maybe with $title in it": > > command => "wget...", > > ... > > } > > And then I have to make up a title that won''t collide > with another title somewhere else. Also, I lose a line > of vertical space on the screen, and I have to go > looking for what the exec is doing, instead of it being > on the first line. Shortcut operators don''t slow me > down at all. Those are my tradeoffs, and why > I chose this style. YMMV. > > But, since you mentioned it: Is it so arcane a practice that > I should avoid it for the sake of people reading my code?If your concern is for the people reading your code then yes, you should give your Execs a plain-language title. You might even find that "people reading your code" includes you, six months from now. Or tomorrow. The readability advantage compounds with the number of Execs in your manifests and with the complexity of their commands. There are advantages other than readability, as well. In particular, the resource title does not change when you tweak the command. This is important if your manifests refer to the Exec resource by title -- in another resource''s "before" or "notify" parameter, for instance. John -- 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.
lucas.brigida@ymail.com
2011-Jun-20 21:53 UTC
Re: [Puppet Users] Problem in wordpress moodule.
I tried using "try the logouput => ON_FAILURE in the exec." But my client is a puppet CentOS. (The puppet version is outdated). Not recognizing this parameter. As you asked, I used the - debug. The output was this: http://pastie.org/2098147 I discovered that any command that has not executed any parameter. Only simple commands. exec {"Free": path => ["/ usr / bin"]} The problem really is in the function "exec". Attached is the module. 2011/6/20 Ken Barber <ken@puppetlabs.com>> Did you try the logouput => on_failure in the exec? > > Can you try that and run the content with the --debug flag so we can > all see the output? (try putting the output in pastie.org if its a lot > of information). > > ken. > > On Mon, Jun 20, 2011 at 1:28 PM, lucas.brigida@ymail.com > <grillobright@gmail.com> wrote: > > I could not do what you suggested at the weekend. > > I tried all the tips you gave me. But I could not fix. > > The file directory is specified, the problem is that it > > gives error unpacking, and when I run the tar command line manually, it > > works fine. > > > > Sorry for my English! > > > > -- > > 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. > > > > -- > 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. > >-- Lucas Pereira Brígida www.codebroken.wordpress.com -- 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.
lucas.brigida@ymail.com
2011-Jun-20 21:53 UTC
Re: [Puppet Users] Re: Problem in wordpress moodule.
2011/6/20 jcbollinger <John.Bollinger@stjude.org>> > > On Jun 18, 1:35 pm, vagn scott <vagnsc...@gmail.com> wrote: > > On 06/18/2011 10:31 AM, Markus Falb wrote: > > > > > > > > > On 18.6.2011 05:30, vagn scott wrote: > > > > >> or you can do what I do and pipe that archive into tar: > > > > >> exec { "true $title&& wget -O - $upstream | tar xzf - > --xform > > >> ''s,wordpress/,,''": > > >> cwd => "$top", > > >> creates => "$top/license.txt", > > >> before => File[ "$top/setup.mysql" ], > > >> } > > > > >> the reason for the ''true $title&&'' part is > > >> that I want to be able to use this exec multiple times (it is in a > > >> defined class). > > >> So I need to get the $title in there so puppet doesn''t think it is > > >> a duplicate definition. > > > > > You can separate the title from the actual command > > > > > exec { "uniqe title maybe with $title in it": > > > command => "wget...", > > > ... > > > } > > > > And then I have to make up a title that won''t collide > > with another title somewhere else. Also, I lose a line > > of vertical space on the screen, and I have to go > > looking for what the exec is doing, instead of it being > > on the first line. Shortcut operators don''t slow me > > down at all. Those are my tradeoffs, and why > > I chose this style. YMMV. > > > > But, since you mentioned it: Is it so arcane a practice that > > I should avoid it for the sake of people reading my code? > > > If your concern is for the people reading your code then yes, you > should give your Execs a plain-language title. You might even find > that "people reading your code" includes you, six months from now. Or > tomorrow. The readability advantage compounds with the number of > Execs in your manifests and with the complexity of their commands. > > There are advantages other than readability, as well. In particular, > the resource title does not change when you tweak the command. This > is important if your manifests refer to the Exec resource by title -- > in another resource''s "before" or "notify" parameter, for instance. > > > John > > -- > 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. > >-- Lucas Pereira Brígida -- 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.
lucas.brigida@ymail.com
2011-Jun-20 21:53 UTC
Re: [Puppet Users] Problem in wordpress moodule.
I tried using "try the logouput => ON_FAILURE in the exec." But my client is a puppet CentOS. (The puppet version is outdated). Not recognizing this parameter. As you asked, I used the - debug. The output was this: http://pastie.org/2098147 I discovered that any command that has not executed any parameter. Only simple commands. exec {"Free": path => ["/ usr / bin"]} The problem really is in the function "exec". Attached is the module. 2011/6/20 Ken Barber <ken@puppetlabs.com>> Did you try the logouput => on_failure in the exec? > > Can you try that and run the content with the --debug flag so we can > all see the output? (try putting the output in pastie.org if its a lot > of information). > > ken. > > On Mon, Jun 20, 2011 at 1:28 PM, lucas.brigida@ymail.com > <grillobright@gmail.com> wrote: > > I could not do what you suggested at the weekend. > > I tried all the tips you gave me. But I could not fix. > > The file directory is specified, the problem is that it > > gives error unpacking, and when I run the tar command line manually, it > > works fine. > > > > Sorry for my English! > > > > -- > > 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. > > > > -- > 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. > >-- Lucas Pereira Brígida www.codebroken.wordpress.com -- 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.
lucas.brigida@ymail.com
2011-Jun-20 21:54 UTC
Re: [Puppet Users] Problem in wordpress moodule.
I tried using "try the logouput => ON_FAILURE in the exec." But my client is a puppet CentOS. (The puppet version is outdated). Not recognizing this parameter. As you asked, I used the - debug. The output was this: http://pastie.org/2098147 I discovered that any command that has not executed any parameter. Only simple commands. exec {"Free": path => ["/ usr / bin"]} The problem really is in the function "exec". Attached is the module. 2011/6/20 Ken Barber <ken@puppetlabs.com>> Did you try the logouput => on_failure in the exec? > > Can you try that and run the content with the --debug flag so we can > all see the output? (try putting the output in pastie.org if its a lot > of information). > > ken. > > On Mon, Jun 20, 2011 at 1:28 PM, lucas.brigida@ymail.com > <grillobright@gmail.com> wrote: > > I could not do what you suggested at the weekend. > > I tried all the tips you gave me. But I could not fix. > > The file directory is specified, the problem is that it > > gives error unpacking, and when I run the tar command line manually, it > > works fine. > > > > Sorry for my English! > > > > -- > > 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. > > > > -- > 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. > >-- Lucas Pereira Brígida -- 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.
> I tried using "try the logouput => ON_FAILURE in the exec." > But my client is a puppet CentOS. (The puppet version is outdated). > Not recognizing this parameter.There is a newer version of Puppet in EPEL testing. For example, RHEL/CentOS 5: http://download.fedora.redhat.com/pub/epel/testing/5Server/x86_64/ I''d suggest upgrading sooner rather then later.> As you asked, I used the - debug. > The output was this: http://pastie.org/2098147So the error you have posted is not related to untar is it? Its a problem with the cp now ... have you posted the correct thing? Are you still having trouble with the tar -xzvf ? err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[cp -rp /usr/share/wordpress/ /var/www/zertico]/returns: change from notrun to 0 failed: cp -rp /usr/share/wordpress/ /var/www/zertico returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:41> I discovered that any command that has not executed any > parameter. Only simple commands. > exec {"Free": path => ["/ usr / bin"]} > > The problem really is in the function "exec".I''m sorry - I don''t understand what you mean here. ken. -- 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.
lucas.brigida@ymail.com
2011-Jun-20 22:15 UTC
Re: [Puppet Users] Problem in wordpress moodule.
I actually posted about the problem with "tar". I decided to modify the module to not depend on "tar" installed. But I realized that any command that has parameters to run, the same problem occurswhen using this command: exec {"$ tar-vzxf downdir} {wordpress.tar.gz" path => ["/ usr / local / bin", "/ opt / local / bin", "/ usr / bin", "/ usr / sbin"] } But when I run for example: exec {"ps"} The error did not occur previously posted. -- Lucas Pereira Brígida www.codebroken.wordpress.com -- 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.
lucas.brigida@ymail.com
2011-Jun-20 22:25 UTC
Re: [Puppet Users] Problem in wordpress moodule.
ken, The error was occurring because the version of the puppet. Thank you! -- 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 Jun 20, 4:54 pm, "lucas.brig...@ymail.com" <grillobri...@gmail.com> wrote:> I tried using "try the logouput => ON_FAILURE in the exec." > But my client is a puppet CentOS. (The puppet version is outdated). > Not recognizing this parameter. > > As you asked, I used the - debug. > The output was this:http://pastie.org/2098147The command that is failing now is ''cp -rp /usr/share/wordpress/ /var/ www/zertico''. Based on the manifests you attached, it looks like you use this executable path: ["/usr/local/bin", "/opt/local/bin", "/usr/ bin", "/usr/sbin"] (but I can''t be sure, because your manifests don''t exactly match your log). On my CentOS 5 boxes, the cp command is in / bin (only; this is the LSB-mandated location), so it will not be found when Puppet attempts to apply your Exec. Given that you''re running a simple command rather than a script, I''d recommend that you just specify the full path to the cp command (i.e. /bin/cp) instead of using a separate ''path'' parameter.> I discovered that any command that has not executed any parameter. Only simple > commands. > exec {"Free": path => ["/ usr / bin"]} > > The problem really is in the function "exec".The problem is in the specific Exec resource(s) in your manifest. Exec in general works fine for many, many people, with a wide variety of commands. John -- 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 Jun 20, 5:15 pm, "lucas.brig...@ymail.com" <grillobri...@gmail.com> wrote:> I actually posted about the problem with "tar". > I decided to modify the module to not depend on "tar" installed. > > But I realized that any command that has parameters to run, the same problem > occurswhen using this command: > > exec {"$ tar-vzxf downdir} {wordpress.tar.gz" > path => ["/ usr / local / bin", "/ opt / local / bin", "/ > usr / bin", "/ usr / sbin"] > }The path in that command is broken: there should be no whitespace around the slashes. That could easily be enough to make the Exec fail. Beyond the whitespace problem, that path also does not contain the standard (LSB) location of the tar command (/bin), which would certainly make the Exec fail if you do not have a copy of tar or a link to it in one of the directories you do specify. On the third hand, the code you posted contains at least two syntax errors, so who knows what you''re really using.> But when I run for example: > exec {"ps"} > > The error did not occur previously posted.Here you are relying on the default path provided by Puppet, which is not documented to work. The docs say that you should either use a fully-qualified command (e.g. "/bin/ps") or specify a search path that can resolve the command (e.g. [ "/bin", "/usr/bin", "/sbin", "/usr/ sbin" ]; note no whitespace in the directory names). I don''t know what Puppet provides as a default, but it must include "/bin". John -- 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.
lucas.brigida@ymail.com
2011-Jun-22 13:12 UTC
Re: [Puppet Users] Re: Problem in wordpress moodule.
These errors that you report was due to bad formatting of the text when posted. But thanks for the tips. 2011/6/22 jcbollinger <John.Bollinger@stjude.org>> > > On Jun 20, 5:15 pm, "lucas.brig...@ymail.com" <grillobri...@gmail.com> > wrote: > > I actually posted about the problem with "tar". > > I decided to modify the module to not depend on "tar" installed. > > > > But I realized that any command that has parameters to run, the same > problem > > occurswhen using this command: > > > > exec {"$ tar-vzxf downdir} {wordpress.tar.gz" > > path => ["/ usr / local / bin", "/ opt / local / bin", > "/ > > usr / bin", "/ usr / sbin"] > > } > > > The path in that command is broken: there should be no whitespace > around the slashes. That could easily be enough to make the Exec > fail. Beyond the whitespace problem, that path also does not contain > the standard (LSB) location of the tar command (/bin), which would > certainly make the Exec fail if you do not have a copy of tar or a > link to it in one of the directories you do specify. On the third > hand, the code you posted contains at least two syntax errors, so who > knows what you''re really using. > > > > But when I run for example: > > exec {"ps"} > > > > The error did not occur previously posted. > > > Here you are relying on the default path provided by Puppet, which is > not documented to work. The docs say that you should either use a > fully-qualified command (e.g. "/bin/ps") or specify a search path that > can resolve the command (e.g. [ "/bin", "/usr/bin", "/sbin", "/usr/ > sbin" ]; note no whitespace in the directory names). I don''t know > what Puppet provides as a default, but it must include "/bin". > > > John > > -- > 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. > >-- Lucas Pereira Brígida -- 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.