provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.
Details:
- Add `compatibility_mode` option to control the Ansible parameters
format to be used. The value corresponds to the minimal version
supported. For the moment, possible values are '1.8' (corresponding to
Vagrant's former behaviour) or '2.0'.
Note that a dynamic inventory generated in compatibility mode '2.0'
is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
supports inventory format generated by the compatibility mode '1.8'.
- Add compatibility mode auto-detection, based on the available Ansible
version. This is the default behaviour in order to bring a maximum of
user friendliness. The drawback of this approach is to let potential
compatibility breaking risks, for `ansible` provisioner setups that
already integrate Ansible 2.x **AND** rely on the existence of
the generated `_ssh` variable names. Thanks to the vagrant warnings
(and its release notes), I argue that it is worth to offer
auto-detection by default, which offers a sweet transition to most
users.
- Add `become`, `become_user` and `ask_become_pass` options and their
backwards compatible aliases. The legacy options are now deprecated.
Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).
Resolve GH-6570
Still Pending:
- Optimization: Reduce the number of `ansible` command executions.
Currently two exec calls will be performed when the compatibility
mode auto-detection is enabled (i.e. by default). We could make the
provisioner a little bit smarter to only execute `ansible` only once
in any situation (by combining "presence" and "version" checks).
- User-friendliness: Add better validator on `compatibility_mode`
option, and shows a warning or an error instead of the silent
fallback on the auto-detection modus.
- Test coverage: All the added behaviours are not fully covered yet.
2016-11-13 19:58:26 +00:00
|
|
|
require_relative "../constants"
|
|
|
|
|
2015-02-10 14:28:00 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Ansible
|
|
|
|
module Config
|
|
|
|
class Base < Vagrant.plugin("2", :config)
|
|
|
|
|
2015-11-19 23:21:41 +00:00
|
|
|
GALAXY_COMMAND_DEFAULT = "ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force".freeze
|
2016-10-09 18:48:50 +00:00
|
|
|
PLAYBOOK_COMMAND_DEFAULT = "ansible-playbook".freeze
|
2015-11-19 22:42:01 +00:00
|
|
|
|
provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.
Details:
- Add `compatibility_mode` option to control the Ansible parameters
format to be used. The value corresponds to the minimal version
supported. For the moment, possible values are '1.8' (corresponding to
Vagrant's former behaviour) or '2.0'.
Note that a dynamic inventory generated in compatibility mode '2.0'
is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
supports inventory format generated by the compatibility mode '1.8'.
- Add compatibility mode auto-detection, based on the available Ansible
version. This is the default behaviour in order to bring a maximum of
user friendliness. The drawback of this approach is to let potential
compatibility breaking risks, for `ansible` provisioner setups that
already integrate Ansible 2.x **AND** rely on the existence of
the generated `_ssh` variable names. Thanks to the vagrant warnings
(and its release notes), I argue that it is worth to offer
auto-detection by default, which offers a sweet transition to most
users.
- Add `become`, `become_user` and `ask_become_pass` options and their
backwards compatible aliases. The legacy options are now deprecated.
Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).
Resolve GH-6570
Still Pending:
- Optimization: Reduce the number of `ansible` command executions.
Currently two exec calls will be performed when the compatibility
mode auto-detection is enabled (i.e. by default). We could make the
provisioner a little bit smarter to only execute `ansible` only once
in any situation (by combining "presence" and "version" checks).
- User-friendliness: Add better validator on `compatibility_mode`
option, and shows a warning or an error instead of the silent
fallback on the auto-detection modus.
- Test coverage: All the added behaviours are not fully covered yet.
2016-11-13 19:58:26 +00:00
|
|
|
attr_accessor :become
|
|
|
|
attr_accessor :become_user
|
|
|
|
attr_accessor :compatibility_mode
|
2016-09-20 20:58:41 +00:00
|
|
|
attr_accessor :config_file
|
2015-02-10 14:28:00 +00:00
|
|
|
attr_accessor :extra_vars
|
2015-11-17 21:06:06 +00:00
|
|
|
attr_accessor :galaxy_role_file
|
|
|
|
attr_accessor :galaxy_roles_path
|
|
|
|
attr_accessor :galaxy_command
|
2015-02-10 14:28:00 +00:00
|
|
|
attr_accessor :groups
|
2016-10-23 18:46:30 +00:00
|
|
|
attr_accessor :host_vars
|
2015-02-10 14:28:00 +00:00
|
|
|
attr_accessor :inventory_path
|
|
|
|
attr_accessor :limit
|
|
|
|
attr_accessor :playbook
|
2016-10-09 18:48:50 +00:00
|
|
|
attr_accessor :playbook_command
|
2015-02-10 14:28:00 +00:00
|
|
|
attr_accessor :raw_arguments
|
|
|
|
attr_accessor :skip_tags
|
|
|
|
attr_accessor :start_at_task
|
|
|
|
attr_accessor :tags
|
|
|
|
attr_accessor :vault_password_file
|
|
|
|
attr_accessor :verbose
|
|
|
|
|
provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.
Details:
- Add `compatibility_mode` option to control the Ansible parameters
format to be used. The value corresponds to the minimal version
supported. For the moment, possible values are '1.8' (corresponding to
Vagrant's former behaviour) or '2.0'.
Note that a dynamic inventory generated in compatibility mode '2.0'
is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
supports inventory format generated by the compatibility mode '1.8'.
- Add compatibility mode auto-detection, based on the available Ansible
version. This is the default behaviour in order to bring a maximum of
user friendliness. The drawback of this approach is to let potential
compatibility breaking risks, for `ansible` provisioner setups that
already integrate Ansible 2.x **AND** rely on the existence of
the generated `_ssh` variable names. Thanks to the vagrant warnings
(and its release notes), I argue that it is worth to offer
auto-detection by default, which offers a sweet transition to most
users.
- Add `become`, `become_user` and `ask_become_pass` options and their
backwards compatible aliases. The legacy options are now deprecated.
Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).
Resolve GH-6570
Still Pending:
- Optimization: Reduce the number of `ansible` command executions.
Currently two exec calls will be performed when the compatibility
mode auto-detection is enabled (i.e. by default). We could make the
provisioner a little bit smarter to only execute `ansible` only once
in any situation (by combining "presence" and "version" checks).
- User-friendliness: Add better validator on `compatibility_mode`
option, and shows a warning or an error instead of the silent
fallback on the auto-detection modus.
- Test coverage: All the added behaviours are not fully covered yet.
2016-11-13 19:58:26 +00:00
|
|
|
#
|
|
|
|
# Deprecated options
|
|
|
|
#
|
|
|
|
alias :sudo :become
|
|
|
|
def sudo=(value)
|
|
|
|
show_deprecation_info 'sudo', 'become'
|
|
|
|
@become = value
|
|
|
|
end
|
|
|
|
alias :sudo_user :become_user
|
|
|
|
def sudo_user=(value)
|
|
|
|
show_deprecation_info 'sudo_user', 'become_user'
|
|
|
|
@become_user = value
|
|
|
|
end
|
|
|
|
|
2015-02-10 14:28:00 +00:00
|
|
|
def initialize
|
provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.
Details:
- Add `compatibility_mode` option to control the Ansible parameters
format to be used. The value corresponds to the minimal version
supported. For the moment, possible values are '1.8' (corresponding to
Vagrant's former behaviour) or '2.0'.
Note that a dynamic inventory generated in compatibility mode '2.0'
is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
supports inventory format generated by the compatibility mode '1.8'.
- Add compatibility mode auto-detection, based on the available Ansible
version. This is the default behaviour in order to bring a maximum of
user friendliness. The drawback of this approach is to let potential
compatibility breaking risks, for `ansible` provisioner setups that
already integrate Ansible 2.x **AND** rely on the existence of
the generated `_ssh` variable names. Thanks to the vagrant warnings
(and its release notes), I argue that it is worth to offer
auto-detection by default, which offers a sweet transition to most
users.
- Add `become`, `become_user` and `ask_become_pass` options and their
backwards compatible aliases. The legacy options are now deprecated.
Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).
Resolve GH-6570
Still Pending:
- Optimization: Reduce the number of `ansible` command executions.
Currently two exec calls will be performed when the compatibility
mode auto-detection is enabled (i.e. by default). We could make the
provisioner a little bit smarter to only execute `ansible` only once
in any situation (by combining "presence" and "version" checks).
- User-friendliness: Add better validator on `compatibility_mode`
option, and shows a warning or an error instead of the silent
fallback on the auto-detection modus.
- Test coverage: All the added behaviours are not fully covered yet.
2016-11-13 19:58:26 +00:00
|
|
|
@become = UNSET_VALUE
|
|
|
|
@become_user = UNSET_VALUE
|
2017-08-26 06:47:35 +00:00
|
|
|
@compatibility_mode = Ansible::COMPATIBILITY_MODE_AUTO
|
2016-09-20 20:58:41 +00:00
|
|
|
@config_file = UNSET_VALUE
|
2015-02-10 14:28:00 +00:00
|
|
|
@extra_vars = UNSET_VALUE
|
2015-11-17 21:06:06 +00:00
|
|
|
@galaxy_role_file = UNSET_VALUE
|
|
|
|
@galaxy_roles_path = UNSET_VALUE
|
|
|
|
@galaxy_command = UNSET_VALUE
|
2015-02-10 14:28:00 +00:00
|
|
|
@groups = UNSET_VALUE
|
2016-10-23 18:46:30 +00:00
|
|
|
@host_vars = UNSET_VALUE
|
2015-02-10 14:28:00 +00:00
|
|
|
@inventory_path = UNSET_VALUE
|
|
|
|
@limit = UNSET_VALUE
|
|
|
|
@playbook = UNSET_VALUE
|
2016-10-09 18:48:50 +00:00
|
|
|
@playbook_command = UNSET_VALUE
|
2015-02-10 14:28:00 +00:00
|
|
|
@raw_arguments = UNSET_VALUE
|
|
|
|
@skip_tags = UNSET_VALUE
|
|
|
|
@start_at_task = UNSET_VALUE
|
|
|
|
@tags = UNSET_VALUE
|
|
|
|
@vault_password_file = UNSET_VALUE
|
|
|
|
@verbose = UNSET_VALUE
|
|
|
|
end
|
|
|
|
|
|
|
|
def finalize!
|
provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.
Details:
- Add `compatibility_mode` option to control the Ansible parameters
format to be used. The value corresponds to the minimal version
supported. For the moment, possible values are '1.8' (corresponding to
Vagrant's former behaviour) or '2.0'.
Note that a dynamic inventory generated in compatibility mode '2.0'
is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
supports inventory format generated by the compatibility mode '1.8'.
- Add compatibility mode auto-detection, based on the available Ansible
version. This is the default behaviour in order to bring a maximum of
user friendliness. The drawback of this approach is to let potential
compatibility breaking risks, for `ansible` provisioner setups that
already integrate Ansible 2.x **AND** rely on the existence of
the generated `_ssh` variable names. Thanks to the vagrant warnings
(and its release notes), I argue that it is worth to offer
auto-detection by default, which offers a sweet transition to most
users.
- Add `become`, `become_user` and `ask_become_pass` options and their
backwards compatible aliases. The legacy options are now deprecated.
Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).
Resolve GH-6570
Still Pending:
- Optimization: Reduce the number of `ansible` command executions.
Currently two exec calls will be performed when the compatibility
mode auto-detection is enabled (i.e. by default). We could make the
provisioner a little bit smarter to only execute `ansible` only once
in any situation (by combining "presence" and "version" checks).
- User-friendliness: Add better validator on `compatibility_mode`
option, and shows a warning or an error instead of the silent
fallback on the auto-detection modus.
- Test coverage: All the added behaviours are not fully covered yet.
2016-11-13 19:58:26 +00:00
|
|
|
@become = false if @become != true
|
|
|
|
@become_user = nil if @become_user == UNSET_VALUE
|
|
|
|
@compatibility_mode = nil unless Ansible::COMPATIBILITY_MODES.include?(@compatibility_mode)
|
2016-09-20 20:58:41 +00:00
|
|
|
@config_file = nil if @config_file == UNSET_VALUE
|
2016-10-09 18:48:50 +00:00
|
|
|
@extra_vars = nil if @extra_vars == UNSET_VALUE
|
|
|
|
@galaxy_role_file = nil if @galaxy_role_file == UNSET_VALUE
|
|
|
|
@galaxy_roles_path = nil if @galaxy_roles_path == UNSET_VALUE
|
|
|
|
@galaxy_command = GALAXY_COMMAND_DEFAULT if @galaxy_command == UNSET_VALUE
|
|
|
|
@groups = {} if @groups == UNSET_VALUE
|
2016-10-23 18:46:30 +00:00
|
|
|
@host_vars = {} if @host_vars == UNSET_VALUE
|
2016-10-09 18:48:50 +00:00
|
|
|
@inventory_path = nil if @inventory_path == UNSET_VALUE
|
|
|
|
@limit = nil if @limit == UNSET_VALUE
|
|
|
|
@playbook = nil if @playbook == UNSET_VALUE
|
|
|
|
@playbook_command = PLAYBOOK_COMMAND_DEFAULT if @playbook_command == UNSET_VALUE
|
|
|
|
@raw_arguments = nil if @raw_arguments == UNSET_VALUE
|
|
|
|
@skip_tags = nil if @skip_tags == UNSET_VALUE
|
|
|
|
@start_at_task = nil if @start_at_task == UNSET_VALUE
|
|
|
|
@tags = nil if @tags == UNSET_VALUE
|
|
|
|
@vault_password_file = nil if @vault_password_file == UNSET_VALUE
|
|
|
|
@verbose = false if @verbose == UNSET_VALUE
|
2015-02-10 14:28:00 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Just like the normal configuration "validate" method except that
|
|
|
|
# it returns an array of errors that should be merged into some
|
|
|
|
# other error accumulator.
|
|
|
|
def validate(machine)
|
|
|
|
@errors = _detected_errors
|
|
|
|
|
2017-08-26 06:47:35 +00:00
|
|
|
# Validate that a compatibility mode was provided
|
|
|
|
if !compatibility_mode
|
|
|
|
@errors << I18n.t("vagrant.provisioners.ansible.errors.no_compatibility_mode",
|
|
|
|
valid_modes: Ansible::COMPATIBILITY_MODES.map { |s| "'#{s}'" }.join(', '))
|
|
|
|
end
|
|
|
|
|
2015-02-10 14:28:00 +00:00
|
|
|
# Validate that a playbook path was provided
|
|
|
|
if !playbook
|
2015-11-17 06:55:32 +00:00
|
|
|
@errors << I18n.t("vagrant.provisioners.ansible.errors.no_playbook")
|
2015-02-10 14:28:00 +00:00
|
|
|
end
|
|
|
|
|
provisioners/ansible(both): fix ansible config files presence checks
With this change, the presence of Ansible configuration files (like
playbook file, inventory path, galaxy role file, etc.) is no longer
performed by the `config` classes, but by the `provisioner` classes
(at the beginning of the provision command).
This change fixes several issues:
- Resolve #6984 as `provision` method are only executed when remote
(ssh) communication with the guest machine is possible.
- Resolve #6763 in a better way than 4e451c6 initially did.
- Improve the general provisioner speed since the `config` checks are
actually triggered by many vagrant actions (e.g. `destroy`,...), and
can also be triggered multiple times during a vagrant run (e.g. on
callback request made by the machine provider).
Unlike the former `config`-based checks, the provision action won't
collect all the invalid options, but only report the first invalid
option found and abort the execution.
Some unit tests were not implemented yet to save my scarce "open source
contribution time" for other important issues, but they should be done
at last via GH-6633.
2016-05-31 22:30:07 +00:00
|
|
|
# Validate that extra_vars is either a Hash or a String (for a file path)
|
2015-02-10 14:28:00 +00:00
|
|
|
if extra_vars
|
|
|
|
extra_vars_is_valid = extra_vars.kind_of?(Hash) || extra_vars.kind_of?(String)
|
|
|
|
if extra_vars.kind_of?(String)
|
provisioners/ansible(both): fix ansible config files presence checks
With this change, the presence of Ansible configuration files (like
playbook file, inventory path, galaxy role file, etc.) is no longer
performed by the `config` classes, but by the `provisioner` classes
(at the beginning of the provision command).
This change fixes several issues:
- Resolve #6984 as `provision` method are only executed when remote
(ssh) communication with the guest machine is possible.
- Resolve #6763 in a better way than 4e451c6 initially did.
- Improve the general provisioner speed since the `config` checks are
actually triggered by many vagrant actions (e.g. `destroy`,...), and
can also be triggered multiple times during a vagrant run (e.g. on
callback request made by the machine provider).
Unlike the former `config`-based checks, the provision action won't
collect all the invalid options, but only report the first invalid
option found and abort the execution.
Some unit tests were not implemented yet to save my scarce "open source
contribution time" for other important issues, but they should be done
at last via GH-6633.
2016-05-31 22:30:07 +00:00
|
|
|
# Accept the usage of '@' prefix in Vagrantfile
|
|
|
|
# (e.g. '@vars.yml' and 'vars.yml' are both supported)
|
2015-02-10 14:28:00 +00:00
|
|
|
match_data = /^@?(.+)$/.match(extra_vars)
|
|
|
|
extra_vars_path = match_data[1].to_s
|
provisioners/ansible(both): fix ansible config files presence checks
With this change, the presence of Ansible configuration files (like
playbook file, inventory path, galaxy role file, etc.) is no longer
performed by the `config` classes, but by the `provisioner` classes
(at the beginning of the provision command).
This change fixes several issues:
- Resolve #6984 as `provision` method are only executed when remote
(ssh) communication with the guest machine is possible.
- Resolve #6763 in a better way than 4e451c6 initially did.
- Improve the general provisioner speed since the `config` checks are
actually triggered by many vagrant actions (e.g. `destroy`,...), and
can also be triggered multiple times during a vagrant run (e.g. on
callback request made by the machine provider).
Unlike the former `config`-based checks, the provision action won't
collect all the invalid options, but only report the first invalid
option found and abort the execution.
Some unit tests were not implemented yet to save my scarce "open source
contribution time" for other important issues, but they should be done
at last via GH-6633.
2016-05-31 22:30:07 +00:00
|
|
|
@extra_vars = '@' + extra_vars_path
|
2015-02-10 14:28:00 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if !extra_vars_is_valid
|
|
|
|
@errors << I18n.t(
|
2015-11-17 06:55:32 +00:00
|
|
|
"vagrant.provisioners.ansible.errors.extra_vars_invalid",
|
2015-02-10 14:28:00 +00:00
|
|
|
type: extra_vars.class.to_s,
|
|
|
|
value: extra_vars.to_s)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-20 16:05:28 +00:00
|
|
|
if raw_arguments
|
2016-04-20 20:27:55 +00:00
|
|
|
if raw_arguments.kind_of?(String)
|
|
|
|
@raw_arguments = [raw_arguments]
|
|
|
|
elsif !raw_arguments.kind_of?(Array)
|
|
|
|
@errors << I18n.t(
|
|
|
|
"vagrant.provisioners.ansible.errors.raw_arguments_invalid",
|
|
|
|
type: raw_arguments.class.to_s,
|
|
|
|
value: raw_arguments.to_s)
|
|
|
|
end
|
2016-04-20 16:05:28 +00:00
|
|
|
end
|
2016-04-20 20:27:55 +00:00
|
|
|
|
2015-02-10 14:28:00 +00:00
|
|
|
end
|
provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.
Details:
- Add `compatibility_mode` option to control the Ansible parameters
format to be used. The value corresponds to the minimal version
supported. For the moment, possible values are '1.8' (corresponding to
Vagrant's former behaviour) or '2.0'.
Note that a dynamic inventory generated in compatibility mode '2.0'
is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
supports inventory format generated by the compatibility mode '1.8'.
- Add compatibility mode auto-detection, based on the available Ansible
version. This is the default behaviour in order to bring a maximum of
user friendliness. The drawback of this approach is to let potential
compatibility breaking risks, for `ansible` provisioner setups that
already integrate Ansible 2.x **AND** rely on the existence of
the generated `_ssh` variable names. Thanks to the vagrant warnings
(and its release notes), I argue that it is worth to offer
auto-detection by default, which offers a sweet transition to most
users.
- Add `become`, `become_user` and `ask_become_pass` options and their
backwards compatible aliases. The legacy options are now deprecated.
Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).
Resolve GH-6570
Still Pending:
- Optimization: Reduce the number of `ansible` command executions.
Currently two exec calls will be performed when the compatibility
mode auto-detection is enabled (i.e. by default). We could make the
provisioner a little bit smarter to only execute `ansible` only once
in any situation (by combining "presence" and "version" checks).
- User-friendliness: Add better validator on `compatibility_mode`
option, and shows a warning or an error instead of the silent
fallback on the auto-detection modus.
- Test coverage: All the added behaviours are not fully covered yet.
2016-11-13 19:58:26 +00:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def show_deprecation_info(deprecated_option, new_option)
|
|
|
|
puts "DEPRECATION: The '#{deprecated_option}' option for the Ansible provisioner is deprecated."
|
|
|
|
puts "Please use the '#{new_option}' option instead."
|
|
|
|
puts "The '#{deprecated_option}' option will be removed in a future release of Vagrant.\n\n"
|
|
|
|
end
|
2015-02-10 14:28:00 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|