Hi
I''m wondering if it''s possible to define some defaults for the
package type. What I want is that package install/updates only
happens at certain times of the day. I could do:
class shorewall {
package { "shorewall":
ensure => latest,
schedule => maintenance
}
}
for every package I want to manage. But that means I have to type
"schedule..." for every definition. Do I have to subclass package as
I do with the "file" type:
define configfile {
file { $name:
owner => root,
mode => 644
}
}
class shorewall {
configfile { "shorewall.conf"
ensure => file
}
}
or are there any other ways to "set defaults" on a type...?
--
Med venlig hilsen
Juri Rischel Jensen
Fab:IT ApS
Vesterbrogade 50
DK-1620 København
Tlf: 70 202 407 / Fax: 33 313 640
www.fab-it.dk / juri@fab-it.dk
Hello,
package {
ensure => latest,
schedule => maintenance,
}
That should do it, just keep in mind scope...
-r''
On 10/12/06, Juri Rischel Jensen <juri@fab-it.dk>
wrote:>
> Hi
>
> I''m wondering if it''s possible to define some defaults
for the
> package type. What I want is that package install/updates only
> happens at certain times of the day. I could do:
>
> class shorewall {
> package { "shorewall":
> ensure => latest,
> schedule => maintenance
> }
> }
>
> for every package I want to manage. But that means I have to type
> "schedule..." for every definition. Do I have to subclass package
as
> I do with the "file" type:
>
> define configfile {
> file { $name:
> owner => root,
> mode => 644
> }
> }
>
> class shorewall {
> configfile { "shorewall.conf"
> ensure => file
> }
> }
>
> or are there any other ways to "set defaults" on a type...?
>
>
> --
> Med venlig hilsen
> Juri Rischel Jensen
>
> Fab:IT ApS
> Vesterbrogade 50
> DK-1620 København
> Tlf: 70 202 407 / Fax: 33 313 640
> www.fab-it.dk / juri@fab-it.dk
>
>
>
> _______________________________________________
> Puppet-users mailing list
> Puppet-users@madstop.com
> https://mail.madstop.com/mailman/listinfo/puppet-users
>
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users
RijilV wrote:> Hello, > > package { > ensure => latest, > schedule => maintenance, > }This is close: You need to capitalize the defaults: Package { schedule => maintenance } The point about scopes is correct, though -- this statement should be in your site.pp file if you want it to affect your whole configuration. -- If you would be a real seeker after truth, it is necessary that at least once in your life you doubt, as far as possible, all things. -- Rene Descartes --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Ahh, that explains why all of my cases of this in my manifest the first letter is capitalized.. I thought it was just some weird formatting... Ah well, next time copy and paste I suppose - probably how I got where I am today :) -r On 10/12/06, Luke Kanies <luke@madstop.com> wrote:> > RijilV wrote: > > Hello, > > > > package { > > ensure => latest, > > schedule => maintenance, > > } > > This is close: You need to capitalize the defaults: > > Package { > schedule => maintenance > } > > The point about scopes is correct, though -- this statement should be in > your site.pp file if you want it to affect your whole configuration. > > -- > If you would be a real seeker after truth, it is necessary that at > least once in your life you doubt, as far as possible, all things. > -- Rene Descartes > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users