Provisioner inside :aws block executes for other providers #22

jamescarr opened this Issue Mar 29, 2013 · 1 comment


None yet

2 participants


Today I dealt with an issue where I had a specific shell provisioner that I only wanted to run on AWS hosts but unfortunately it executes regardless of what provider I use.

For example, say I have this block:

node_config.vm.provider :aws do |aws|
    aws.access_key_id = ENV["AWS_ACCESS_KEY_ID"]
    aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"]
    aws.keypair_name = ENV["AWS_KEYPAIR_NAME"]
    aws.region = "us-east-1"
    aws.ami = "ami-ae9806c7"
    aws.ssh_username = "ubuntu"
    aws.ssh_private_key_path = ENV["AWS_SSH_PRIVKEY"]
    aws.instance_type = "m1.medium"

    node_config.vm.provision :shell, :inline => puppet_bootstrap(node)

puppet_bootstrap still executes if I launch a VM using the virtualbox provider.


Right, configuration is not scoped within providers like this. This is working as intended.

Perhaps there is a usability improvement, however, where I can warn the user that this is happening.

@mitchellh mitchellh closed this Mar 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment