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

Commit c2e1515

Browse files
authored
Drop ansible as a direct dependency (#78)
1 parent ba3bf9e commit c2e1515

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_language_version:
44
minimum_pre_commit_version: "1.14.0"
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v3.2.0
7+
rev: v3.3.0
88
hooks:
99
- id: end-of-file-fixer
1010
- id: trailing-whitespace
@@ -27,7 +27,7 @@ repos:
2727
- id: black
2828
language_version: python3
2929
- repo: https://gitlab.com/pycqa/flake8.git
30-
rev: 3.8.3
30+
rev: 3.8.4
3131
hooks:
3232
- id: flake8
3333
additional_dependencies:

molecule_vagrant/driver.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,16 @@ def _get_instance_config(self, instance_name):
213213
def sanity_checks(self):
214214
if not which("vagrant"):
215215
util.sysexit_with_message("vagrant executable was not found!")
216-
try:
217-
import vagrant # noqa
218-
except ImportError:
219-
util.sysexit_with_message(
220-
"Unable to import python vagrant module. Running "
221-
"'pip instgt .all python-vagrant' should fix it."
222-
)
216+
217+
# TODO(ssbarnea): Replace code below with variant that check if ansible
218+
# has vagrant module available.
219+
# try:
220+
# import vagrant # noqa
221+
# except ImportError:
222+
# util.sysexit_with_message(
223+
# "Unable to import python vagrant module. Running "
224+
# "'pip instgt .all python-vagrant' should fix it."
225+
# )
223226

224227
def template_dir(self):
225228
"""Return path to its own cookiecutterm templates. It is used by init

setup.cfg

+5-2
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,16 @@ setup_requires =
6262

6363
# These are required in actual runtime:
6464
install_requires =
65-
ansible >= 2.9.5
6665
molecule >= 3.2.0a0
6766
pyyaml >= 5.1, < 6
68-
python-vagrant
6967
selinux
7068

7169
[options.extras_require]
70+
# Used to document Ansible specific requirements, not plugin requirements, as
71+
# they can be installed in different environments.
72+
ansible =
73+
ansible
74+
python-vagrant
7275
test =
7376
molecule[test]
7477

tox.ini

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ isolated_build = True
1313
description =
1414
Unit testing
1515
usedevelop = True
16-
extras = test
16+
extras =
17+
ansible
18+
test
1719
deps =
1820
py{36,37,38,39}: molecule[test]
1921
py{36,37,38,39}-{devel}: git+https://github.com/ansible-community/molecule.git@master#egg=molecule[test]

0 commit comments

Comments
 (0)