diff --git a/plugins/provisioners/ansible/provisioner/guest.rb b/plugins/provisioners/ansible/provisioner/guest.rb index 147e212ce..b94445619 100644 --- a/plugins/provisioners/ansible/provisioner/guest.rb +++ b/plugins/provisioners/ansible/provisioner/guest.rb @@ -55,8 +55,9 @@ module VagrantPlugins # Check that ansible binaries are well installed on the guest, @machine.communicate.execute( "ansible-galaxy info --help && ansible-playbook --help", - :error_class => Ansible::Errors::AnsibleNotFoundOnGuest, - :error_key => :ansible_not_found_on_guest) + error_class: Ansible::Errors::AnsibleNotFoundOnGuest, + error_key: :ansible_not_found_on_guest + ) # Check if requested ansible version is available if (!config.version.empty? && @@ -68,8 +69,8 @@ module VagrantPlugins def execute_ansible_galaxy_on_guest command_values = { - :role_file => get_galaxy_role_file(config.provisioning_path), - :roles_path => get_galaxy_roles_path(config.provisioning_path) + role_file: get_galaxy_role_file(config.provisioning_path), + roles_path: get_galaxy_roles_path(config.provisioning_path) } remote_command = config.galaxy_command % command_values @@ -94,9 +95,9 @@ module VagrantPlugins end def execute_on_guest(command) - @machine.communicate.execute(command, :error_check => false) do |type, data| + @machine.communicate.execute(command, error_check: false) do |type, data| if [:stderr, :stdout].include?(type) - @machine.env.ui.info(data, :new_line => false, :prefix => false) + @machine.env.ui.info(data, new_line: false, prefix: false) end end end diff --git a/plugins/provisioners/ansible/provisioner/host.rb b/plugins/provisioners/ansible/provisioner/host.rb index f61024722..83a614a10 100644 --- a/plugins/provisioners/ansible/provisioner/host.rb +++ b/plugins/provisioners/ansible/provisioner/host.rb @@ -89,8 +89,8 @@ module VagrantPlugins def execute_ansible_galaxy_from_host command_values = { - :role_file => get_galaxy_role_file(machine.env.root_path), - :roles_path => get_galaxy_roles_path(machine.env.root_path) + role_file: get_galaxy_role_file(machine.env.root_path), + roles_path: get_galaxy_roles_path(machine.env.root_path) } command_template = config.galaxy_command.gsub(' ', VAGRANT_ARG_SEPARATOR) str_command = command_template % command_values