Hi Jacov,
stage is a meta-attribute which you can use when declaring a class.
You added the stage attribute to the class definition.
You can change your code to look like the following:
class yum::repo::pgdg92 (
$exclude = []
) {
…
}
Afterwards you use the stage attribute in the class declaration:
class { 'yum::repo::pgdg92':
exclude => ….,
stage => 'yumsetup',
}
hth,
Martin
On Jul 22, 2013, at 7:31 PM, Jakov Sosic <[email protected]> wrote:
> # puppet master --compile web01.example.com > /dev/null
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::base definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::epel definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::atomic definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::rpmforge definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::srce definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::srce::intern definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::puppetlabs definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::ius definition
> Warning: stage is a metaparam; this value will inherit to all contained
> resources in the yum::repo::pgdg92 definition
>
>
>
> This is example of one of the classes (yum::repo::pgdg92):
>
> class yum::repo::pgdg92 (
> $stage = 'yumsetup',
> $exclude = [],
> ){
> require yum::repo::base
>
> file { '/etc/yum.repos.d/pgdg-92-centos.repo' :
> ensure => file,
> mode => '0644',
> owner => root,
> group => root,
> source =>
> "puppet:///modules/yum/${::operatingsystem}/${::operatingsystemrelease}/pgdg-92-centos.repo",
> require => Package['pgdg-centos92'],
> }
>
> # install package depending on major version
> case $::operatingsystemrelease {
> default: {}
> /^5.*/: {
> package { 'pgdg-centos92' :
> ensure => '9.2-6',
> provider => 'rpm',
> source =>
> 'http://yum.postgresql.org/9.2/redhat/rhel-5-i386/pgdg-centos92-9.2-6.noarch.rpm',
> }
> }
> /^6.*/: {
> package { 'pgdg-centos92' :
> ensure => '9.2-6',
> provider => 'rpm',
> source =>
> 'http://yum.postgresql.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm',
> }
> }
> }
> }
>
>
> So, what should I do with this warning?! Move stage (meta)parameter from
> class to resources (file/package)? Or simply ignore it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.