Configurações do Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise32"
config.vm.define :web do |web_config|
web_config.vm.network "private_network", ip: "192.168.3.10"
web_config.vm.provision "shell", inline: "sudo apt-get update && sudo apt-get install puppet -y"
end
end
Configurações de web.pp:
exec { "apt-update":
command => "/usr/bin/apt-get update"
}
package { ["openjdk-7-jre", "tomcat7"]:
ensure => installed,
require => Exec["apt-update"]
}
service { "tomcat7":
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => Package["tomcat7"]
}
file { "/var/lib/tomcat7/webapps/vraptor-musicjungle.war":
source => "/vagrant/manifests/vraptor-musicjungle.war",
owner => "tomcat7",
group => "tomcat7",
mode => 0644,
require => Package["tomcat7"],
notify => Service["tomcat7"]
}
Erro ao executar "sudo puppet apply /vagrant/manifests/web.pp":
vagrant@precise32:~$ sudo puppet apply /vagrant/manisfests/web.pp
warning: Could not retrieve fact fqdn
notice: /Stage[main]//Exec[apt-update]/returns: executed successfully
err: /Stage[main]//File[/var/lib/tomcat7/webapps/vraptor-musicjungle.war]: Could not evaluate: Could not retrieve information from environment production source(s) file:/vagrant/manifests/vraptor-musicjungle.war at /vagrant/manisfests/web.pp:25
notice: /Stage[main]//Service[tomcat7]: Dependency File[/var/lib/tomcat7/webapps/vraptor-musicjungle.war] has failures: true
warning: /Stage[main]//Service[tomcat7]: Skipping because of failed dependencies
notice: Finished catalog run in 5.25 seconds
Não estou conseguindo avançar...