Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for provision_command #78

Closed
berniedurfee opened this issue Feb 26, 2014 · 3 comments
Closed

Add support for provision_command #78

berniedurfee opened this issue Feb 26, 2014 · 3 comments

Comments

@berniedurfee
Copy link

The kitchen-docker driver has a 'provision_command' attribute that allows you to specifically set the command executed when provisioning the Chef client. This is much more flexible than just setting the URL for the script and would really help those of us trapped behind a corporate firewall.

@sethvargo
Copy link
Contributor

Thanks @cobzilla. This will be included as part of test-kitchen/test-kitchen#329.

@ozbillwang
Copy link

Seems still in progress.

@Lirt
Copy link

Lirt commented Mar 3, 2018

For anybody looking for hotfix, you can follow this guide http://www.elmund.io/2015/07/05/run-a-script-on-a-test-kitchen-vm-before-converge-starts/

Basically if you specify driver in .kitchen.yml like this:

platforms:
   - name: fedora-27
     driver:
       provision: True
       vagrantfiles:
         - fedora27_provision.rb

And then you specify provisioning file fedora27_provision.rb like code below, you can do preprovisioning steps:

Vagrant.configure(2) do |config|
  config.vm.provision "shell", inline: <<-SHELL
     sudo dnf install -y python2
  SHELL
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants