# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.box = "dummy"

  config.vm.provider :aws do |aws, override|
    aws.access_key_id = "<%= @provider_config.fetch("access_key") %>"
    aws.secret_access_key = "<%= @provider_config.fetch("secret_access_key") %>"
    aws.keypair_name = "<%= @provider_config.fetch("keypair_name") %>"

    # aws.ami = "ami-a81470c1"
    aws.ami = "<%= @provider_config.fetch("ami") %>"
    override.ssh.private_key_path = "<%= @provider_config.fetch("ssh_private_key_path") %>"
    override.ssh.username = "ubuntu"
  end

  config.vm.provision :puppet do |puppet|
    puppet.facter = { 
      "role" => "ci", 
      "operationsystem" => "debian",
      "vagrant_user" => "ubuntu", 
      "vagrant_home" => "/home/ubuntu"
    }
    puppet.module_path = "<%= @puppet_path %>/modules"
    puppet.manifests_path = "<%= @puppet_path %>/manifests"
    puppet.manifest_file = "main.pp"
    <% if @options["verbose"] == true %>
    puppet.options = "--verbose --debug"
    <% end %>
  end
end

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.box = "dummy"

  config.vm.provider :aws do |aws, override|
    aws.access_key_id = "<%= @provider_config.fetch("access_key") %>"
    aws.secret_access_key = "<%= @provider_config.fetch("secret_access_key") %>"
    aws.keypair_name = "<%= @provider_config.fetch("keypair_name") %>"

    # aws.ami = "ami-a81470c1"
    aws.ami = "<%= @provider_config.fetch("ami") %>"
    override.ssh.private_key_path = "<%= @provider_config.fetch("ssh_private_key_path") %>"
    override.ssh.username = "ubuntu"
  end

  config.vm.provision :puppet do |puppet|
    puppet.facter = { 
      <% @project_config.puppet_facts.each do |k, v| %>
        "<%= k %>" => "<%= v %>",
      <% end %>
      "role" => "ci", 
      "operationsystem" => "debian",
      "vagrant_user" => "ubuntu", 
      "vagrant_home" => "/home/ubuntu"
    }
    puppet.module_path = "<%= @puppet_path %>/modules"
    puppet.manifests_path = "<%= @puppet_path %>/manifests"
    puppet.manifest_file = "main.pp"
    <% if @options["verbose"] == true %>
    puppet.options = "--verbose --debug"
    <% end %>
  end
end

Add puppet facts support to Aws provider.
Add puppet facts support to Aws provider.
