Hi all,
I''m struggling with the following:
I have a defined type wrapped in a class:
class myclass {
define mytype(bla) {
file { "blabla":
....
}
exec { "blablabla":
...
}
}
}
And I access the defined type in my other class by doing this:
class otherclass {
include myclass
myclass::mytype { "alb":
...
}
# and here I want to require my defined type:
file { "albalb:
ensure => "exists",
require => Myclass::mytype["alb"],
}
}
But puppet burps at me and says the syntax is wrong. But how can I do
this (if I can at all)?
--
Best regards/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
On Jul 24, 2007, at 2:06 AM, Juri Rischel Jensen wrote:> But puppet burps at me and says the syntax is wrong. But how can I do > this (if I can at all)?This should be fixed in 0.23.1. -- I have a switch in my apartment... It doesn''t do anything. Every once in a while, I turn it on and off. One day I got a call... It was from a woman in France... She said, "Cut it out!" -- Stephen Wright --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Wouldn''t this also work?
* disclaimer *
is still trying to fully grok include vs. inherit
* end disclaimer *
class otherclass inherits myclass {
mytype { "alb":
....
}
file { "foo":
require => mytype["alb"], # or would this be just
"alb" since it''s
already defined as a resource
}
}
On 7/24/07, Luke Kanies <luke@madstop.com> wrote:>
> On Jul 24, 2007, at 2:06 AM, Juri Rischel Jensen wrote:
>
> > But puppet burps at me and says the syntax is wrong. But how can I do
> > this (if I can at all)?
>
> This should be fixed in 0.23.1.
>
> --
> I have a switch in my apartment... It doesn''t do anything. Every
once
> in a while, I turn it on and off. One day I got a call... It was from
> a woman in France... She said, "Cut it out!"
> -- Stephen Wright
> ---------------------------------------------------------------------
> Luke Kanies | http://reductivelabs.com | http://madstop.com
>
>
> _______________________________________________
> Puppet-users mailing list
> Puppet-users@madstop.com
> https://mail.madstop.com/mailman/listinfo/puppet-users
>
--
stickm@gmail.com
-==< Stick >==-
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users
--On Tuesday, July 24, 2007 6:28 PM -0400 Chris MacLeod <stickm@gmail.com> wrote:> class otherclass inherits myclass { > mytype { "alb": > .... > } > file { "foo": > require => mytype["alb"], # or would this be just "alb" since > it''s already defined as a resource > } > }You would want to upper case it: require => Mytype["alb"]