Q:

Puppet-Apt fails to install package because of verification

Environment:
Running CentOs 7.2 Server in a virtual machine, which has a local proxy set up with CNTLM. I have installed vagrant version 1.8.1. In addition i installed the vagrant-proxyconf plugin.
Goal:
Set up a virtual machine on the CentOs 7.2 Server with vagrant.
Yes: A virtual machine in a virtual machine. 
Status quo:
A snippet of the Vagrantfile:
...
config.proxy.http = http://10.0.2.2:3128
config.proxy.https = http://10.0.2.2:3128
config.proxy.no_proxy = localhost, 127.0.0.*, 10.0.2.*
...

# puppet config
config.vm.provision :puppet, :module_path => "../puppet/modules" do |puppet|
  puppet.manifests_path = "../puppet/manifests"
  puppet.manifest_file  = "base.pp"
  # In facts are the proxy settings with host and port. 
  puppet.facter = facts
end

A snippet of my puppet manifest:
class box-configuration {
  ...
  class { 'apt':
   always_apt_update => true;
  } 

  # Always a apt-key update before installing packages 
  exec { 'apt-key_update':
   command => "/usr/bin/apt-key update && /usr/bin/apt-get update",
   require => Class['apt'],
  }
  apt::ppa { 'ppa:openjdk-r/ppa': }

  package { ["unzip", "curl", "openjdk-8-jdk"]:
    ensure => present,
    require => [Class['apt'], Exec['apt-key_update']],
  }
...
}

Problem:
When i'm running vagrant up in the terminal, i get the following error for the package openjdk-8-jdk:

All other packages could be installed successfully. 
After the failure, i connected to the virtual machine with vagrant ssh to install this package manually with sudo apt-get install openjdk-8-jdk and then i got the following prompt:
 Install these packages without verification [y/N]? 

apt-get install openjdk-8-jdk wants a verification for downloading the package from the recently added repository in base.pp.
What should i do for this? I already add the Exec['apt-key_update'] requirement...
EDIT:
When i connect to the virtual machine with vagrant ssh to make manually the update apt-key update && apt-get update i get the following output:

A:

You dont have dependencies on the apt::ppa { 'ppa:openjdk-r/ppa': } when you install the java package, so you can make a dep 
apt::ppa { 'ppa:openjdk-r/ppa': }
exec { 'apt-key_update':
  command => "/usr/bin/apt-key update && /usr/bin/apt-get update",
  require => [Class['apt'], Apt::ppa['ppa:openjdk-r/ppa']],
}
package { ["unzip", "curl", "openjdk-8-jdk"]:
  ensure => present,
  require => [Class['apt'], Exec['apt-key_update']],
}

EDIT : I tested on ubuntu/trusty64 box and I used the apt module (you need to make sure it is installed) and the following puppet file
class box-configuration {

  class { 'apt':
    update => {
      frequency => 'always',
    },
  } 

  # Always a apt-key update before installing packages 
  exec { 'apt-key_update':
   command => "/usr/bin/apt-key update && /usr/bin/apt-get update",
   require => [Class['apt'], Apt::Ppa['ppa:openjdk-r/ppa']]
  }
  apt::ppa { 'ppa:openjdk-r/ppa': }

  package { ["unzip", "curl", "openjdk-8-jdk"]:
    ensure => present,
    require => [Class['apt'], Exec['apt-key_update']],
  }
}

include box-configuration

everything goes fine and java8 is installed - you can see a gist of all the installation process

A:

The problem here was CNTLM  with the version 0.92.3.. They have some problems in this version with the proxy tunneling. They recommend to install the 0.93beta5 version, and this solved my problem... But you can't get the beta version from SourceForge.. I download the beta version from this repository. 
Otherwise check the answer of @Frédéric Henri, this could solve your problem, when everything with CNTLM is ok. 

