Enable logoutput => on_failure.
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
Try to run the command on the command line and check the error code
# /usr/bin/mysqladmin -u root PASSWORD papa
# echo $?
What is the output of both commands? Then you should read the manual
what the returncode of 1 actually means. Normally a returncode that is
not zero indicates an error and that is why puppet complains. If a
returncode of 1 is actually expected when running mysqladmin you can
specify your resource with the returns parameter[1]
exec { 'root password':
command => '/usr/bin/mysqladmin -u root PASSWORD papa',
returns => '1', # or even returns => ['0','1'] to allow both
require => Package['mysql-server-5.1'],
}
[1] http://docs.puppetlabs.com/references/stable/type.html#returns-1
-Stefan