張旭
2010-Nov-22 02:12 UTC
[Puppet Users] a dummy question - Could I use regular expression in Package ?
I''m a newbie in Puppet. I had googled for a while, I just wonder if those work ? (syntax below) packe { provider => "yum" allowcdrom => true "python*": ensure => installed; "mysql*": ensure => installed; } please help! thanks! -- 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.
Peter Meier
2010-Nov-22 11:13 UTC
Re: [Puppet Users] a dummy question - Could I use regular expression in Package ?
> I just wonder if those work ? (syntax below)no. ~pete -- 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.
donavan
2010-Nov-23 08:01 UTC
[Puppet Users] Re: a dummy question - Could I use regular expression in Package ?
On Nov 21, 6:12 pm, 張旭 <zx1...@gmail.com> wrote:> I''m a newbie in Puppet. > I had googled for a while, > I just wonder if those work ? (syntax below)There are a couple of points here. If you want to set a default paramters for a resource[1]: Package{ provider => yum } I think ''allowcdrom'' parameter is only for ''apt'' provider, not yum[2]. You need to explicitly list each resource to manage, no wildcard: package { "mysql": ensure => installed; "mysql-devel": ensure => installed; "mysq-serverl": ensure => installed; } However there is a shortcut. If all of the resources have the same parameters you can specify an array[3] of names: package { ["mysql", "mysql-devel", "mysq-serverl"]: ensure => installed; } [1] http://docs.puppetlabs.com/guides/language_tutorial.html#resource-defaults [2] http://docs.puppetlabs.com/references/latest/type.html#package [3] http://docs.puppetlabs.com/guides/language_tutorial.html#arrays -- 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.