Include before/after options in final provision hash

This commit is contained in:
Brian Cain 2019-08-20 11:31:00 -07:00
parent 6db03f2aed
commit 6777493c46
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
2 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,8 @@ module Vagrant
options = {
name: provisioner.name,
run: provisioner.run,
before: provisioner.before,
after: provisioner.after,
}
# Return the result
@ -38,6 +40,13 @@ module Vagrant
return @_provisioner_instances.compact
end
# Sorts provisioners based on order specified with before/after options
#
# @return [Array<Provisioner, Hash>]
def sort_provisioner_instances(pvs)
return pvs
end
# This will return a mapping of a provisioner instance to its
# type.
def provisioner_type_map(env)

View File

@ -105,6 +105,8 @@ module VagrantPlugins
@config.finalize!
end
# Validates the before/after options
#
# @param [Vagrant::Machine] machine - machine to validate against
# @param [Array<Symbol>] provisioner_names - Names of provisioners for a given machine
# @return [Array] array of strings of error messages from config option validation