2

デフォルトのindex.file(apaceh2に付属)を/var/www/gitリポジトリにあるindexファイルで上書きするパペットモジュールを作成しようとしています。私は人形プラグイン Vcsrepo を使用してリポジトリを複製しています。

 vcsrepo { "/var/www/":
                provider => git,
                source => "git@git.*****/testing.git",
                identity => '/root/.ssh/id_rsa',
                require => Package['git'],
        }

私は今、このエラーが発生しています:

Error: /Stage[main]/Web::Repository/Vcsrepo[/var/www/]: Could not evaluate: undefined method `include?' for nil:NilClass

force=>"true"問題を解決することができずに、 を試しました。

4

1 に答える 1

0

これを行う最も簡単な方法は、git リポジトリを別の場所に複製し、fileリソースを使用index.fileしてチェックアウト内のバージョンへのコピーまたはシンボリック リンクを作成することです。

vcsrepo { "/tmp/apacherepo":
  provider => git,
  source   => "git@git.*****/testing.git",
  identity => '/root/.ssh/id_rsa',
  require  => Package['git'],
}

file { '/var/www/index.file':
  ensure  => present,
  source  => '/tmp/apacherepo/index.file',
  require => Vcsrepo['/tmp/apacherepo']
}
于 2015-04-01T12:44:44.027 に答える