2016-04-12 9 views
0

:Hata: tam katalog uygulanamıyor: Bulunan 1 bağımlılık döngüsü aşağıdaki komutu çalıştırırken

:

İşte
Error: Could not apply complete catalog: Found 1 dependency cycle: 
(File[/etc/postfix] => File[/etc/postfix]) 
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz 

ilgili tezahür/modüller var:

puppet apply --verbose /etc/puppet/manifests/sites.pp/site1.pp 

hatası alıyorum

/etc/puppet/modules/postfix/manifests/init.pp:

class postfix { 

    package { 'postfix' : 
     ensure => present 
    } 

    file { '/etc/postfix' : 
     path => "/etc/postfix/main.cf", 
     ensure => present, 
     content => template("postfix/main.cf.erb"), 
     subscribe => Package['postfix'] 
    } 

} 

/etc/puppet/manifests/sites.pp/site1.pp:

class site1 { 

    include apache2 
    include essentials 
    include mysql 
    include python2 
    include postfix 
} 

Orada postfix başka hiçbir söz diğer modüllerin herhangi çekiyor ve include postfix çıkarmadan tam kukla uygulamak sağlar devam etmek için, bu yüzden kendi içinde yer aldığını varsayalım.

Ayrıca, şablonu kaldırmaya ve hiçbir değişiklik yapmadan, modül içerisine yer tutucu içeriği koymaya çalıştım.

cevap

2

Bazı nedenlerden dolayı kaynak adından farklı bir yol kullanıyorsunuz. Bu, kendiliğinden otoklavlamaya ve dairesel bağımlılığa neden olur.

file { '/etc/postfix' : 
    ensure=>directory 
} 
file { '/etc/postfix/main.cf': 
    ensure => present, 
    content => template("postfix/main.cf.erb"), 
    subscribe => Package['postfix'] 
} 

Sorununuz

+0

derp çözmek Will! Teşekkürler :) – DanH

İlgili konular