You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 10, 2018. It is now read-only.
In particular: in order for the chef provision -d (destroy) option to work, the user must set the action on machine resources to ChefDK::ProvisioningData.context.action. An example of this is provided in https://www.chef.io/blog/2015/08/18/policyfiles-a-guided-tour/ copied below:
context=ChefDK::ProvisioningData.context# Set the port dynamically via the command line:target_port=context.opts.portwith_driver'vagrant:~/.vagrant.d/boxes'dooptions={vagrant_options: {'vm.box'=>'opscode-ubuntu-14.04','vm.network'=>":forwarded_port, guest: 80, host: #{target_port}"},convergence_options: context.convergence_options}machinecontext.node_namedomachine_options(options)# This forces a chef run every time, which is sensible for `chef provision`# use cases.converge(true)action(context.action)endend
By default, ChefDK::ProvisioningData.context.action will be :converge, but if the user passes the -d option to chef provision, ChefDK::ProvisioningData.context.action will be set to :destroy.
Upstream bug: chef-boneyard/chef-dk#618
In particular: in order for the
chef provision -d
(destroy) option to work, the user must set the action on machine resources toChefDK::ProvisioningData.context.action
. An example of this is provided in https://www.chef.io/blog/2015/08/18/policyfiles-a-guided-tour/ copied below:By default,
ChefDK::ProvisioningData.context.action
will be:converge
, but if the user passes the-d
option tochef provision
,ChefDK::ProvisioningData.context.action
will be set to:destroy
.The relevant code for this behavior is here:
The text was updated successfully, but these errors were encountered: