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-us...@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