コードを見ると、いくつかの問題があります。
1 つは、Travis で使用している環境変数が Puppet のバージョンを設定していないことです。そのコードをに追加する必要がありますspec_helper_acceptance.rb
:
hosts.each do |host|
install_puppet_on(host,
:puppet => ENV['PUPPET_VERSION'] || '4.3.2',
)
end
現在、まだ Puppet 3.8 (デフォルトの最新版) をインストールしています。
Travis で実際に何が問題を引き起こしているのかについての詳細は、リポジトリをフォークして、ビーカーのデバッグおよびトレース オプションを有効にしたビルドを行いました。
result = apply_manifest(pp, :trace => true, :debug => true)
このことから、Travis ビルドを見ると、git clone exec に問題があります。
Debug: Exec[clone-repo](provider=posix): Executing 'git clone https://github.com/fiuba/alfred.git /var/www/alfred'
Debug: Executing 'git clone https://github.com/fiuba/alfred.git /var/www/alfred'
Notice: /Stage[main]/Alfred::App/Exec[clone-repo]/returns: fatal: Could not change back to '/root': Permission denied
Error: git clone https://github.com/fiuba/alfred.git /var/www/alfred returned 128 instead of one of [0]
vcsrepo
これは、よりべき等な方法で git clone を実行するモジュールを使用して修正できます。
vcsrepo { '/var/www/alfred':
ensure => present,
source => 'https://github.com/fiuba/alfred.git',
provider => git,
user => 'deployer',
}
他にもいくつかの修正があります。修正するためにモジュールにいくつかの修正をPRしています。いくつかの異なるアプローチによる重要なリファクタリングであるため、確認してマージした後、スタックオーバーフローの回答に要約を追加します。