2016-07-14 4 views
0

私はマニフェストで定義されたステップの「上から下へ」実行を達成しようとしています。完全なカタログを適用することができませんでした::実測値1つの依存サイクル: (Execの[unzip_ui] => [thirdparties] =>ファイルをファイル、それは人為的なマニフェストの順序は、デンデンシーサイクルのために失敗します

パペット(ERR)で失敗したマニフェストの構文解析中に

define ui_deploy::ui_deploy_manifest($deploy_params, $params) { 

$version = $deploy_params['version'] 
$install_dir = $deploy_params['install_dir'] 

file { "$install_dir/unzip-ui.ps1": 
    ensure => present, 
    content => template('ui_deploy/unzip.erb') 
} 

exec { "unzip_ui": 
    path => 'C:\Windows\System32\WindowsPowerShell\v1.0', 
    command => "powershell -executionpolicy remotesigned -file ${install_dir}/unzip-ui.ps1", 
    require => File["$install_dir/unzip-ui.ps1"], 
    logoutput => true 
} 

file { "thirdparties": 
    path => 'D:\teamdeploy_install_dir\ui', 
    source => 'D:\teamdeploy_install_dir\thirdp', 
    recurse => true, 
    require => [ 
       Exec["unzip_ui"], 
       Anchor["after-com.team.project.project-thirdparty"], 
       ] 
} 

file { "$install_dir/msbuild.bat": 
    ensure => present, 
    content => template('ui_deploy/msbuild.erb'), 
    require => File["thirdparties"] 
} 

exec { "run_msbuild": 
    command => "cmd.exe /c ${install_dir}\\msbuild.bat", 
    path => $path, 
    require => File["$install_dir/msbuild.bat"], 
    logoutput => true 
}} 

[D:\ teamdeploy_install_dir \ ui/unzip-ui.ps1] => Exec [unzip_ui]

ここでサイクルはどこにあるのか分かりません。私の視点から見ると、それは依存関係のチェーンですが、ループではありません。私がこれに間違っているところを教えてください。 私は 'before'ステートメントでも書き直そうとしましたが、結果は同じです。

+0

'Anchor [" after-com.team.project.project-thirdparty "]、'は問題のパラメータであるようです。それを取り除いてテストし、何が起こるか教えてください。 –

+0

あなたが提示したコードはサイクルを説明していません。具体的には、 'File [thirdparties] => File [D:\ teamdeploy_install_dir \ ui/unzip-ui.ps1]'で表される依存関係については説明しません。あなたが提示したものが実際に問題に関係するリソース宣言の場所である場合、スコープ内のリソースのデフォルトを介して、またはコレクタベースのリソースのオーバーライドを介して、他の手段によって1つ以上の追加の関係が宣言されています。 –

+0

この問題は、マニフェスト解析(a.k.a.カタログ構築)ではなく、カタログアプリケーションで検出されたようにも見えます。 –

答えて

0

の書き換えによって、この問題が解決されます。

関連する問題