Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Drop ansible as a direct dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Oct 29, 2020
1 parent ba3bf9e commit 4c926d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 10 additions & 7 deletions molecule_vagrant/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,16 @@ def _get_instance_config(self, instance_name):
def sanity_checks(self):
if not which("vagrant"):
util.sysexit_with_message("vagrant executable was not found!")
try:
import vagrant # noqa
except ImportError:
util.sysexit_with_message(
"Unable to import python vagrant module. Running "
"'pip instgt .all python-vagrant' should fix it."
)

# TODO(ssbarnea): Replace code below with variant that check if ansible
# has vagrant module available.
# try:
# import vagrant # noqa
# except ImportError:
# util.sysexit_with_message(
# "Unable to import python vagrant module. Running "
# "'pip instgt .all python-vagrant' should fix it."
# )

def template_dir(self):
"""Return path to its own cookiecutterm templates. It is used by init
Expand Down
7 changes: 5 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,16 @@ setup_requires =

# These are required in actual runtime:
install_requires =
ansible >= 2.9.5
molecule >= 3.2.0a0
pyyaml >= 5.1, < 6
python-vagrant
selinux

[options.extras_require]
# Used to document Ansible specific requirements, not plugin requirements, as
# they can be installed in different environments.
ansible =
ansible
python-vagrant
test =
molecule[test]

Expand Down

0 comments on commit 4c926d0

Please sign in to comment.