From http://docs.puppetlabs.com/puppet/latest/reference/lang_defined_types.html
Type definitions may also be placed inside class definitions; however, this limits their availability to that class and is not recommended for any purpose. This is not formally deprecated in this version of Puppet, but may become so in a future release.
--------
I think the problem is this, you should put the define in
modules/virtualuser/manifests/virtual/localuser.pp
Obv outside any class.
Regards,
--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/90c5032b-8e2d-468a-a159-32c926c3684d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Well, the define has changed its name, the file should be named addvirtualuser.pp to enable the autoloader load it. Anyway if it is in the same init.pp it should work.
Are you sure the class virtualuser is included ? Are you sure $virtual is true? I am not sure about that, but I think you should include the virtualuser class before any class that wants to realize
I would set a couple of notifies in the virtual user class and in the define to check if it I'd behaving correctly.
Also you can try to call the define without virtualizing it to check if it works.
Regards,
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/acd53a40-e612-49b8-8f5f-f0c6ba1047f0%40googlegroups.com.