diff --git a/.kitchen.yml b/.kitchen.yml new file mode 100644 index 0000000..2e6593a --- /dev/null +++ b/.kitchen.yml @@ -0,0 +1,65 @@ +--- +driver: + name: vagrant + +provisioner: + name: chef_zero + product_name: chef + product_version: "14" + require_chef_omnibus: "14" + data_bags_path: "test/data_bags" + log_level: info + +platforms: + - name: ubuntu-18.04 + driver: + provision: true + vagrantfiles: + - vagrant.rb + - name: ubuntu-16.04 + driver: + provision: true + vagrantfiles: + - vagrant.rb + - name: ubuntu-14.04 + driver: + provision: true + vagrantfiles: + - vagrant.rb + +verifier: + name: inspec + +suites: + - name: Python3and2_pip19 + driver_config: + vm_hostname: test-node1 + customize: + memory: 512 + cpus: 1 + run_list: + - recipe[poise-python] + verifier: + inspec_tests: + - test/integration/base_python_tests + attributes: + poise-python: + install_python3: true + options: + pip_version: 19 + - name: Python3and2_pip18 + driver_config: + vm_hostname: test-node1 + customize: + memory: 512 + cpus: 1 + run_list: + - recipe[poise-python] + verifier: + inspec_tests: + - test/integration/base_python_tests + attributes: + poise-python: + install_python3: true + options: + pip_version: 18 \ No newline at end of file diff --git a/Berksfile b/Berksfile new file mode 100644 index 0000000..8fafea2 --- /dev/null +++ b/Berksfile @@ -0,0 +1,17 @@ +cookbook_path = File.expand_path '../' + +if File.directory? cookbook_path + puts 'COOKBOOK PATH ' + cookbook_path +else + abort "CAN'T FIND MY COOKBOOK PATH. You may need to edit the Berksfile to fit your environment." +end + +source 'https://supermarket.chef.io' + +# Upstream cookbooks +cookbook 'poise' +cookbook 'poise-languages' + + +metadata + diff --git a/README.md b/README.md index 8f1ccd5..66ae92a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is a patched fork for other users who still use it and need fixes It can be used by adding the following to your berks file ``` -cookbook 'poise-python', git: 'https://github.com/ITJamie/poise-python-patched.git' +cookbook 'poise-python', git: 'https://github.com/enova/enova-python.git' ``` if you need the install function youll need to lock to pip 18 currently in your attributes or recipe diff --git a/files/halite_gem/poise_python/python_providers/base.rb b/files/halite_gem/poise_python/python_providers/base.rb index 9e43cea..3b1939c 100644 --- a/files/halite_gem/poise_python/python_providers/base.rb +++ b/files/halite_gem/poise_python/python_providers/base.rb @@ -48,6 +48,7 @@ def action_install # Second inner converge for the support tools. This is needed because # we run a python command to check if venv is available. notifying_block do + install_distutils install_pip install_setuptools install_wheel @@ -98,6 +99,27 @@ def uninstall_python raise NotImplementedError end + # Setup distutils on ubuntu. this is a total PIA ubuntu! + # @return [void] + def install_distutils + # hack to workaround python not having distutils on ubuntu... + Chef::Log.info("[#{new_resource}] distutils installer - only valid on ubuntu for python 3") + # TODO: we should launch python and check if distutils can be imported. if not do the package install below \ + # the logic below is not good + if options[:version].to_s == '3' && node[:platform] == "ubuntu" && node[:platform_version].split('.')[0].to_i >= 18 + Chef::Log.info("[#{new_resource}] Installing distutils as this is ubuntu and its messed up") + poise_languages_system 'python3-distutils' do + parent new_resource + dev_package false + action :install + end + # this worked but we dont want to be doing apt commands raw... + #cmd = poise_shell_out('apt-get install -y python3-distutils', environment: python_environment) + #puts cmd if cmd.error? + #return unless cmd.error? + #Chef::Log.info("[#{new_resource}] Installed distutils") + end + end # Install pip in to the Python runtime. # # @return [void] diff --git a/files/halite_gem/poise_python/python_providers/system.rb b/files/halite_gem/poise_python/python_providers/system.rb index e166173..51e2fe0 100644 --- a/files/halite_gem/poise_python/python_providers/system.rb +++ b/files/halite_gem/poise_python/python_providers/system.rb @@ -74,7 +74,7 @@ def system_package_candidates(version) end # Aliases for 2 and 3. if version == '3' || version == '' - names.concat(%w{python3.5 python35 python3.4 python34 python3.3 python33 python3.2 python32 python3.1 python31 python3.0 python30 python3}) + names.concat(%w{python3.6 python3.5 python35 python3.4 python34 python3.3 python33 python3.2 python32 python3.1 python31 python3.0 python30 python3}) end if version == '2' || version == '' names.concat(%w{python2.7 python27 python2.6 python26 python2.5 python25}) diff --git a/files/halite_gem/poise_python/resources/python_package.rb b/files/halite_gem/poise_python/resources/python_package.rb index 7d6579d..e858bda 100644 --- a/files/halite_gem/poise_python/resources/python_package.rb +++ b/files/halite_gem/poise_python/resources/python_package.rb @@ -37,11 +37,16 @@ module PythonPackage import sys import pip + # Don't use pkg_resources because I don't want to require it before this anyway. if re.match(r'0\\.|1\\.|6\\.0', pip.__version__): sys.stderr.write('The python_package resource requires pip >= 6.1.0, currently '+pip.__version__+'\\n') sys.exit(1) - +tempstore = pip.__version__.split('.') +if len(tempstore) > 1: + current_version_pip_int = float(tempstore[0]+"."+tempstore[1]) +else: + current_version_pip_int = float(tempstore[0]) try: from pip.commands import InstallCommand from pip.index import PackageFinder @@ -50,7 +55,12 @@ module PythonPackage # Pip 10 moved all internals to their own package. from pip._internal.commands import InstallCommand from pip._internal.index import PackageFinder - from pip._internal.req import InstallRequirement + if current_version_pip_int <= 18.1: + from pip._internal.req import InstallRequirement + else: + from pip._internal.req.constructors import ( + install_req_from_editable, install_req_from_line, + ) packages = {} cmd = InstallCommand() @@ -74,7 +84,10 @@ module PythonPackage finder = PackageFinder(**finder_options) find_all = getattr(finder, 'find_all_candidates', getattr(finder, '_find_all_versions', None)) for arg in args: - req = InstallRequirement.from_line(arg) + if current_version_pip_int <= 18.1: + req = InstallRequirement.from_line(arg) + else: + req = install_req_from_line(arg) found = finder.find_requirement(req, True) all_candidates = find_all(req.name) candidate = [c for c in all_candidates if c.location == found] @@ -351,6 +364,7 @@ def pip_install(name, version, upgrade: false) # @param requirements [Array] Pip-formatted package requirements. # @return [Mixlib::ShellOut] def pip_outdated(requirements) + puts "checking for #{requirements.to_s}" pip_command(nil, :list, requirements, input: PIP_HACK_SCRIPT, pip_runner: %w{-}) end diff --git a/metadata.json b/metadata.json deleted file mode 100644 index a6e56c7..0000000 --- a/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"poise-python","version":"1.7.0","description":"A Chef cookbook for managing Python installations.","long_description":"# Poise-Python Cookbook\n\n[![Build Status](https://img.shields.io/travis/poise/poise-python.svg)](https://travis-ci.org/poise/poise-python)\n[![Gem Version](https://img.shields.io/gem/v/poise-python.svg)](https://rubygems.org/gems/poise-python)\n[![Cookbook Version](https://img.shields.io/cookbook/v/poise-python.svg)](https://supermarket.chef.io/cookbooks/poise-python)\n[![Coverage](https://img.shields.io/codecov/c/github/poise/poise-python.svg)](https://codecov.io/github/poise/poise-python)\n[![Gemnasium](https://img.shields.io/gemnasium/poise/poise-python.svg)](https://gemnasium.com/poise/poise-python)\n[![License](https://img.shields.io/badge/license-Apache_2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\nA [Chef](https://www.chef.io/) cookbook to provide a unified interface for\ninstalling Python, managing Python packages, and creating virtualenvs.\n\n## Quick Start\n\nTo install the latest available version of Python 2 and then use it to create\na virtualenv and install some packages:\n\n```ruby\npython_runtime '2'\n\npython_virtualenv '/opt/myapp/.env'\n\npython_package 'Django' do\n version '1.8'\nend\n\npip_requirements '/opt/myapp/requirements.txt'\n```\n\n## Installing a Package From a URI\n\nWhile using `python_package 'git+https://github.com/example/mypackage.git'` will\nsometimes work, this approach is not recommended. Unfortunately pip's support\nfor installing directly from URI sources is limited and cannot support the API\nused for the `python_package` resource. You can run the install either directly\nfrom the URI or through an intermediary `git` resource:\n\n```ruby\n# Will re-install on every converge unless you add a not_if/only_if.\npython_execute '-m pip install git+https://github.com/example/mypackage.git'\n\n# Will only re-install when the git repository updates.\npython_execute 'install mypackage' do\n action :nothing\n command '-m pip install .'\n cwd '/opt/mypackage'\nend\ngit '/opt/mypackage' do\n repository 'https://github.com/example/mypackage.git'\n notifies :run, 'python_execute[install mypackage]', :immediately\nend\n```\n\n## Supported Python Versions\n\nThis cookbook can install at least Python 2.7, Python 3, and PyPy on all\nsupported platforms (Debian, Ubuntu, RHEL, CentOS, Fedora).\n\n### Windows Support\n\nThe latest version of `poise-python` includes basic support for managing Python\non Windows. This currently doesn't support Python 3.5, but everything should be\nworking. Consider this support tested but experimental at this time.\n\n## Requirements\n\nChef 12.1 or newer is required.\n\n## Attributes\n\nAttributes are used to configure the default recipe.\n\n* `node['poise-python']['install_python2']` – Install a Python 2.x runtime. *(default: true)*\n* `node['poise-python']['install_python3']` – Install a Python 3.x runtime. *(default: false)*\n* `node['poise-python']['install_pypy']` – Install a PyPy runtime. *(default: false)*\n\n## Recipes\n\n### `default`\n\nThe default recipe installs Python 2, 3, and/or PyPy based on the node\nattributes. It is entirely optional and can be ignored in favor of direct use\nof the `python_runtime` resource.\n\n## Resources\n\n### `python_runtime`\n\nThe `python_runtime` resource installs a Python interpreter.\n\n```ruby\npython_runtime '2'\n```\n\n#### Actions\n\n* `:install` – Install the Python interpreter. *(default)*\n* `:uninstall` – Uninstall the Python interpreter.\n\n#### Properties\n\n* `version` – Version of Python to install. If a partial version is given, use the\n latest available version matching that prefix. *(name property)*\n* `get_pip_url` – URL to download the `get-pip.py` bootstrap script from.\n *(default: https://bootstrap.pypa.io/get-pip.py)*\n* `pip_version` – Version of pip to install. If set to `true`, use the latest.\n If set to `false`, do not install pip. For backward compatibility, can also be\n set to a URL instead of `get_pip_url`. *(default: true)*\n* `setuptools_version` – Version of Setuptools to install. If set to `true`, use\n the latest. If set to `false`, do not install Setuptools. *(default: true)*\n* `virtualenv_version` – Version of virtualenv to install. If set to `true`,\n use the latest. If set to `false`, do not install virtualenv. Will never be\n installed if the `venv` module is already available, such as on Python 3.\n *(default: true)*\n* `wheel_version` – Version of wheel to install. If set to `true`, use the\n latest. If set to `false`, do not install wheel.\n\n#### Provider Options\n\nThe `poise-python` library offers an additional way to pass configuration\ninformation to the final provider called \"options\". Options are key/value pairs\nthat are passed down to the `python_runtime` provider and can be used to control how it\ninstalls Python. These can be set in the `python_runtime`\nresource using the `options` method, in node attributes or via the\n`python_runtime_options` resource. The options from all sources are merged\ntogether in to a single hash.\n\nWhen setting options in the resource you can either set them for all providers:\n\n```ruby\npython_runtime 'myapp' do\n version '2.7'\n options pip_version: false\nend\n```\n\nor for a single provider:\n\n```ruby\npython_runtime 'myapp' do\n version '2.7'\n options :system, dev_package: false\nend\n```\n\nSetting via node attributes is generally how an end-user or application cookbook\nwill set options to customize installations in the library cookbooks they are using.\nYou can set options for all installations or for a single runtime:\n\n```ruby\n# Global, for all installations.\noverride['poise-python']['options']['pip_version'] = false\n# Single installation.\noverride['poise-python']['myapp']['version'] = 'pypy'\n```\n\nThe `python_runtime_options` resource is also available to set node attributes\nfor a specific installation in a DSL-friendly way:\n\n```ruby\npython_runtime_options 'myapp' do\n version '3'\nend\n```\n\nUnlike resource attributes, provider options can be different for each provider.\nNot all providers support the same options so make sure to the check the\ndocumentation for each provider to see what options the use.\n\n### `python_runtime_options`\n\nThe `python_runtime_options` resource allows setting provider options in a\nDSL-friendly way. See [the Provider Options](#provider-options) section for more\ninformation about provider options overall.\n\n```ruby\npython_runtime_options 'myapp' do\n version '3'\nend\n```\n\n#### Actions\n\n* `:run` – Apply the provider options. *(default)*\n\n#### Properties\n\n* `resource` – Name of the `python_runtime` resource. *(name property)*\n* `for_provider` – Provider to set options for.\n\nAll other attribute keys will be used as options data.\n\n### `python_execute`\n\nThe `python_execute` resource executes a Python script using the configured runtime.\n\n```ruby\npython_execute 'myapp.py' do\n user 'myuser'\nend\n```\n\nThis uses the built-in `execute` resource and supports all the same properties.\n\n#### Actions\n\n* `:run` – Execute the script. *(default)*\n\n#### Properties\n\n* `command` – Script and arguments to run. Must not include the `python`. *(name attribute)*\n* `python` – Name of the `python_runtime` resource to use. If not specified, the\n most recently declared `python_runtime` will be used. Can also be set to the\n full path to a `python` binary.\n* `virtualenv` – Name of the `python_virtualenv` resource to use. This is\n mutually exclusive with the `python` property.\n\nFor other properties see the [Chef documentation](https://docs.chef.io/resource_execute.html#attributes).\n\n### `python_package`\n\nThe `python_package` resource installs Python packages using\n[pip](https://pip.pypa.io/).\n\n```ruby\npython_package 'Django' do\n version '1.8'\nend\n```\n\nThis uses the built-in `package` resource and supports the same actions and\nproperties. Multi-package installs are supported using the standard syntax.\n\n#### Actions\n\n* `:install` – Install the package. *(default)*\n* `:upgrade` – Install using the `--upgrade` flag.\n* `:remove` – Uninstall the package.\n\nThe `:purge` and `:reconfigure` actions are not supported.\n\n#### Properties\n\n* `group` – System group to install the package.\n* `package_name` – Package or packages to install. *(name property)*\n* `version` – Version or versions to install.\n* `python` – Name of the `python_runtime` resource to use. If not specified, the\n most recently declared `python_runtime` will be used. Can also be set to the\n full path to a `python` binary.\n* `user` – System user to install the package.\n* `virtualenv` – Name of the `python_virtualenv` resource to use. This is\n mutually exclusive with the `python` property.\n* `options` – Options to pass to `pip`.\n* `install_options` – Options to pass to `pip install` (and similar commands).\n* `list_options` – Options to pass to `pip list` (and similar commands).\n\nFor other properties see the [Chef documentation](https://docs.chef.io/resource_package.html#attributes).\nThe `response_file`, `response_file_variables`, and `source` properties are not\nsupported.\n\n### `python_virtualenv`\n\nThe `python_virtualenv` resource creates Python virtual environments.\n\n```ruby\npython_virtualenv '/opt/myapp'\n```\n\nThis will use the `venv` module if available, or `virtualenv` otherwise.\n\n#### Actions\n\n* `:create` – Create the virtual environment. *(default)*\n* `:delete` – Delete the virtual environment.\n\n#### Properties\n\n* `group` – System group to create the virtualenv.\n* `path` – Path to create the environment at. *(name property)*\n* `pip_version` – Version of pip to install. If set to `true`, use the latest.\n If set to `false`, do not install pip. Can also be set to a URL to a copy of\n the `get-pip.py` script. *(default: true)*\n* `python` – Name of the `python_runtime` resource to use. If not specified, the\n most recently declared `python_runtime` will be used. Can also be set to the\n full path to a `python` binary.\n* `setuptools_version` – Version of Setuptools to install. If set to `true`, use\n the latest. If set to `false`, do not install Setuptools. *(default: true)*\n* `system_site_packages` – Enable or disable visibilty of system packages in\n the environment. *(default: false)*\n* `user` – System user to create the virtualenv.\n* `wheel_version` – Version of wheel to install. If set to `true`, use the\n latest. If set to `false`, do not install wheel.\n\n### `pip_requirements`\n\nThe `pip_requirements` resource installs packages based on a `requirements.txt`\nfile.\n\n```ruby\npip_requirements '/opt/myapp/requirements.txt'\n```\n\nThe underlying `pip install` command will run on every converge, but\nnotifications will only be triggered if a package is actually installed.\n\n#### Actions\n\n* `:install` – Install the requirements. *(default)*\n* `:upgrade` – Install using the `--upgrade` flag.\n\n#### Properties\n\n* `path` – Path to the requirements file, or a folder containing the\n requirements file. *(name property)*\n* `cwd` – Directory to run `pip` from. *(default: directory containing the\n `requirements.txt`)*\n* `group` – System group to install the packages.\n* `options` – Command line options for use with `pip install`.\n* `python` – Name of the `python_runtime` resource to use. If not specified, the\n most recently declared `python_runtime` will be used. Can also be set to the\n full path to a `python` binary.\n* `user` – System user to install the packages.\n* `virtualenv` – Name of the `python_virtualenv` resource to use. This is\n mutually exclusive with the `python` property.\n\n## Python Providers\n\n### Common Options\n\nThese provider options are supported by all providers.\n\n* `pip_version` – Override the pip version.\n* `setuptools_version` – Override the Setuptools version.\n* `version` – Override the Python version.\n* `virtualenv_version` – Override the virtualenv version.\n* `wheel_version` – Override the wheel version.\n\n### `system`\n\nThe `system` provider installs Python using system packages. This is currently\nonly tested on platforms using `apt-get` and `yum` (Debian, Ubuntu, RHEL, CentOS\nAmazon Linux, and Fedora) and is a default provider on those platforms. It may\nwork on other platforms but is untested.\n\n```ruby\npython_runtime 'myapp' do\n provider :system\n version '2.7'\nend\n```\n\n#### Options\n\n* `dev_package` – Install the package with the headers and other development\n files. Can be set to a string to select the dev package specifically.\n *(default: true)*\n* `package_name` – Override auto-detection of the package name.\n* `package_upgrade` – Install using action `:upgrade`. *(default: false)*\n* `package_version` – Override auto-detection of the package version.\n\n### `scl`\n\nThe `scl` provider installs Python using the [Software Collections](https://www.softwarecollections.org/)\npackages. This is only available on RHEL, CentOS, and Fedora. SCL offers more\nrecent versions of Python than the system packages for the most part. If an SCL\npackage exists for the requested version, it will be used in preference to the\n`system` provider.\n\n```ruby\npython_runtime 'myapp' do\n provider :scl\n version '3.4'\nend\n```\n\n### `portable_pypy`\n\nThe `portable_pypy` provider installs Python using the [Portable PyPy](https://github.com/squeaky-pl/portable-pypy)\npackages. These are only available for Linux, but should work on any Linux OS.\n\n```ruby\npython_runtime 'myapp' do\n provider :portable_pypy\n version 'pypy'\nend\n```\n\n### `portable_pypy3`\n\nThe `portable_pypy3` provider installs Python 3 using the [Portable PyPy](https://github.com/squeaky-pl/portable-pypy)\npackages. These are only available for Linux, but should work on any Linux OS.\n\n```ruby\npython_runtime 'myapp' do\n provider :portable_pypy3\n version 'pypy3'\nend\n```\n\n#### Options\n\n* `folder` – Folder to install PyPy in. *(default: /opt/)*\n* `url` – URL to download the package from. *(default: automatic)*\n\n### `deadsnakes`\n\n*Coming soon!*\n\n### `python-build`\n\n*Coming soon!*\n\n## Upgrading from the `python` Cookbook\n\nThe older `python` cookbook is not directly compatible with this one, but the\nbroad strokes overlap well. The `python::default` recipe is roughly equivalent\nto the `poise-python::default` recipe. The `python::pip` and `python::virtualenv`\nrecipes are no longer needed as installing those things is now part of the\n`python_runtime` resource. The `python::package` recipe corresponds with the\n`system` provider for the `python_runtime` resource, and can generally be\nreplaced with `poise-python::default`. At this time there is no provider to\ninstall from source so there is no replacement for the `python::source` recipe,\nhowever this is planned for the future via a `python-build` provider.\n\nThe `python_pip` resource can be replaced with `python_package`, though the\n`environment` property has been removed. The `python_virtualenv` resource can remain\nunchanged except for the `interpreter` property now being `python` and the\n`options` property has been removed.\n\n## Sponsors\n\nDevelopment sponsored by [Bloomberg](http://www.bloomberg.com/company/technology/).\n\nThe Poise test server infrastructure is sponsored by [Rackspace](https://rackspace.com/).\n\n## License\n\nCopyright 2015-2017, Noah Kantrowitz\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","maintainer":"Noah Kantrowitz","maintainer_email":"noah@coderanger.net","license":"Apache-2.0","platforms":{"ubuntu":">= 0.0.0","debian":">= 0.0.0","redhat":">= 0.0.0","centos":">= 0.0.0","fedora":">= 0.0.0","amazon":">= 0.0.0","windows":">= 0.0.0"},"dependencies":{"poise":"~> 2.7","poise-languages":"~> 2.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/poise/poise-python","issues_url":"https://github.com/poise/poise-python/issues","chef_version":[["< 15",">= 12.14"]],"ohai_version":[]} \ No newline at end of file diff --git a/metadata.rb b/metadata.rb new file mode 100644 index 0000000..8ea4aae --- /dev/null +++ b/metadata.rb @@ -0,0 +1,10 @@ +name 'poise-python' +maintainer 'Enova International' +maintainer_email 'api@enova.com' +license 'Apache-2' +description 'Installs/Configures python and modules' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '1.7.1' + +depends "poise","~> 2.7" +depends "poise-languages","~> 2.0" \ No newline at end of file diff --git a/recipes/default.rb b/recipes/default.rb index e9d04eb..c297e07 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -14,6 +14,12 @@ # limitations under the License. # +if ENV['TEST_KITCHEN'] + puts "TEST_OUTPUT:" + puts node['poise-python'] +end + + # Default runtimes, last one will be the default. python_runtime 'pypy' if node['poise-python']['install_pypy'] python_runtime '3' if node['poise-python']['install_python3'] diff --git a/test/integration/base_python_tests/inspec.yml b/test/integration/base_python_tests/inspec.yml new file mode 100644 index 0000000..f748436 --- /dev/null +++ b/test/integration/base_python_tests/inspec.yml @@ -0,0 +1,10 @@ +name: python_tests +title: InSpec Profile for testing base python installs +maintainer: xxx +copyright: xxx +copyright_email: xxx +license: Apache-2.0 +summary: An InSpec Compliance Profile +version: 0.1.0 +supports: + platform: os \ No newline at end of file diff --git a/test/integration/base_python_tests/libraries/.gitkeep b/test/integration/base_python_tests/libraries/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vagrant.rb b/vagrant.rb new file mode 100644 index 0000000..5fda976 --- /dev/null +++ b/vagrant.rb @@ -0,0 +1,10 @@ +Vagrant.configure(2) do |config| + config.ssh.insert_key = false + # rubocop:disable Style/HashSyntax + config.vm.provision 'shell', inline: <<-SHELL + sudo apt-get update -y && apt-get install vim git unzip build-essential -y + ## sudo apt-get --only-upgrade install libssl* + ##sudo apt-get install -y libssl libssl-dev + SHELL + # rubocop:enable Style/HashSyntax +end