Am Freitag, 29. Juli 2016 12:19:15 UTC+2 schrieb Haani Niyaz:
>
>
>
> In the app.pp defined type I have the following:
>
>
> define web_server::app(
>   $package_name,
>   $repo_name,
>   $package_version,
>   $credentials
> ) {
>
>    include web_server
>
>     class{'web_server::app::install':
>
>       package_name     => $package_name,
>       repo_name        => $repo_name,
>       package_version  => $package_version,
>     } ->
>
>     class { 'web_server::app::config': 
>       credentials => $credentials, 
>     } 
>
>     contain ::web_server::app::install
>     contain ::web_server::app::config
>
> }
>
>
>
> Inside the server::app::config file i have a few  
> Class['web_server::service'] 
> notify statements to restart the service on app file changes. However this 
> is causing dependency cycle errors.
>
> here?
>

You can't declare a class more than once.  the " class{
'web_server::app::install':" and class { 'web_server::app::config': needs 
to be a defined type too, if you require it to be called with different 
params. A class can only exist excatly once.

IMHO contain should not be used inside a defined type - but as you need to 
convert the classes to defined types, this problem is already solved. (
https://docs.puppet.com/puppet/latest/reference/lang_containment.html#containing-classes)

- Thomas

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a2cb0382-d016-478f-ad73-31ed4e94f3fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to