Hello,
I resolved the structure inside my init.pp, but the command in the puppet agent 
fails:

[………]
Jan  3 12:25:45 mail2 puppet-agent[31902]: (/Stage[main]/Updateso/Exec[yum 
--exclude=drbd* --exclude=kernel* --exclude=mysql* --exclude=php* update 
-y]/returns) change from notrun to 0 failed: yum --exclude=drbd* 
--exclude=kernel* --exclude=mysql* --exclude=php* update -y returned 1 instead 
of one of [0] at /etc/puppet/modules/updateso/manifests/init.pp:13
[………]

My class updateso

[………]

class updateso  {

schedule{ daily:
        range => "10 - 15",
        repeat => 2,
 }

exec { "yum --exclude=drbd* --exclude=kernel* --exclude=mysql* --exclude=php* 
update -y": #LINE 13
        schedule => daily,
        path => "/usr/local/bin/:/bin/:/usr/bin/",
#       refreshonly => true, 
#       command => "yum --exclude=kernel* --exclude=mysql* --exclude=php* 
update -y",
}

#}


}
[………]


The line 13 is the command yum --exclude …… 


Thanks!


El 02-01-2013, a las 16:53, Kazor <miguelc...@gmail.com> escribió:

> Hello guys,
> I'm creating class for update my servers these are Centos (RedHat Family) .  
> But when i run from puppet client, only apply update version but the command 
> "yum update" declared within  in my class not found .
> 
> 
> My class "updateso" (/etc/puppet/modules/updateso/manifests/init.pp) :
> 
> [.............]
> 
> class updateso  {
> 
> #operatingsystem => CentOS
> #operatingsystemrelease => 5.8
> #osfamily => RedHat
> #architecture => x86_64
> 
> if $osfamily == 'RedHat' {
> 
> schedule { "daily":
>         period => daily,
>         range => "12 - 17",
>         repeat => "1",
> }
> 
> exec { "Update SO":
>         user => "root",
>         command => "/usr/bin/yum --exclude=kernel* --exclude=mysql* 
> --exclude=php* update -y",
>         schedule => daily,
>         refreshonly => true, 
>  }
>         
> }
> 
> } #End class
> 
> [.............]
> 
> 
> My instance site.pp
> 
> [.............]
> 
> node 'mail.example.com' {
>         include updateso
> }
> 
> [.............]
> 
> From agent:
> 
> [.............]
> 
> [root@correo ~]# puppet agent --test        
> info: Caching catalog for mail.example.com
> info: Applying configuration version '1357155391'
> notice: Finished catalog run in 0.12 seconds
> [.............]
> 
> 
> ¿Any suggestions?
> 
> Thanks!
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/puppet-users/-/CoiasMKiwMQJ.
> 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.

Reply via email to