Re: [Puppet Users] Re: Problem in wordpress moodule.

2011-06-22 Thread lucas.brig...@ymail.com
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.bollin...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
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 k...@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.brig...@ymail.com
 grillobri...@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+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.




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



wordpress-module.tar.gz
Description: GNU Zip compressed data


Re: [Puppet Users] Re: Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
2011/6/20 jcbollinger john.bollin...@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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
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 k...@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.brig...@ymail.com
 grillobri...@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+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.




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



wordpress-module.tar.gz
Description: GNU Zip compressed data


Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
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 k...@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.brig...@ymail.com
 grillobri...@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+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.




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



wordpress-module.tar.gz
Description: GNU Zip compressed data


Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Problem in wordpress moodule.

2011-06-17 Thread lucas.brig...@ymail.com
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.