Hello all, I am facing a problem while dealing with a custom provider and its requirements. I have included a custom provider (with its custom types) into my puppet deployment that is expected to deal with all tasks related to glassfish. This provider is able to create domains, deploy applications and other features.
This provider also requires a glassfish executable named 'asadmin' that is available after glassfish is installed. If the executable is available at the machine where agent is executed all works fine but if it is not available a message like '[default] ←[0;37mdebug: Puppet::Type::Domain::ProviderAsadmin: file asadmin does not exist←[0m Could not find a default provider for domain' is returned. All that behaviour is normal since there are not alternative providers for my resources and then the provider is not appliable but the problem appears when I want to install the application AND THEN work with the provider. In the theoretical scenario, puppet should install glassfish, deal with path and finally do some work with the provider but the real scenario is not that. The real scenario is that puppet does a prefetch of all resources that deal with providers and tries to load them. Since 'asadmin' is not yet available, the execution fails. Do anyone knows any way to let puppet skip that (or delay it until glassfish has been installed) and finish successfully? Would stages do a trick here? The only workaround that I have found has been perform the installation in a first provision and then, at the second provision, deal with resources. Scenario: - Install Glassfish - Configure Glassfish - Deal with resources (provider) Sample code: node default { include glassfish Domain { user => "${glassfish::user}", asadminuser => "${glassfish::admin_user}", passwordfile => "${glassfish::home}/.aspass", portbase => "${glassfish::domain_port}" } domain { $glassfish::domain : ensure => present, require => File['create-aspass-file'], notify => Service['glassfish'], } } class glassfish { include glassfish::download, glassfish::install, glassfish::config #Dependencies Class['glassfish::download'] -> Class['glassfish::install'] -> Class['glassfish::config'] } -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.