Fala pessoal tudo bem ?
Estou obtendo o seguinte erro ao tentar executar o puppet:
jorge@machinewar:~/Documentos/cursos/devops/musicjungle$ puppet apply manifests/web.pp
Notice: Compiled catalog for machinewar in environment production in 0.75 seconds
Notice: /Stage[main]/Main/Exec[apt-update]/returns: Lendo listas de pacotes...
Notice: /Stage[main]/Main/Exec[apt-update]/returns: E: Não foi possível abrir arquivo de trava /var/lib/apt/lists/lock - open (13: Permission denied)
Notice: /Stage[main]/Main/Exec[apt-update]/returns: E: Impossível criar acesso exclusivo ao directório /var/lib/apt/lists/
Notice: /Stage[main]/Main/Exec[apt-update]/returns: W: Problema ao remover o link do ficheiro /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
Notice: /Stage[main]/Main/Exec[apt-update]/returns: W: Problema ao remover o link do ficheiro /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
Error: '/usr/bin/apt-get update' returned 100 instead of one of [0]
Error: /Stage[main]/Main/Exec[apt-update]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/apt-get update' returned 100 instead of one of [0]
Notice: /Stage[main]/Main/Package[openjdk-7-jre]: Dependency Exec[apt-update] has failures: true
Warning: /Stage[main]/Main/Package[openjdk-7-jre]: Skipping because of failed dependencies
Notice: /Stage[main]/Main/Package[tomcat7]: Dependency Exec[apt-update] has failures: true
Warning: /Stage[main]/Main/Package[tomcat7]: Skipping because of failed dependencies
Notice: Applied catalog in 0.43 seconds
jorge@machinewar:~/Documentos/cursos/devops/musicjungle$
Meu 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.50.10"
end
end
meu web.pp
exec { "apt-update":
command => "/usr/bin/apt-get update"
}
package { ["openjdk-7-jre", "tomcat7"]:
ensure => installed,
require => Exec["apt-update"]
}
Grato