Skip to content

Instantly share code, notes, and snippets.

@konstruktoid
Created April 25, 2023 09:34
Show Gist options
  • Save konstruktoid/4f5849e65989ecd2421b1aa52132d09a to your computer and use it in GitHub Desktop.
Save konstruktoid/4f5849e65989ecd2421b1aa52132d09a to your computer and use it in GitHub Desktop.
$ pip3 install -U ansible-core ansible-lint molecule "molecule-plugins[vagrant]"
[...]
WARNING: molecule-plugins 23.4.0 does not provide the extra 'vagrant'
[...]
$ pip3 install -U ansible-core ansible-lint molecule molecule-plugins molecule-vagrant
$ molecule check
Traceback (most recent call last):
File "/home/ubuntu/py310/bin/molecule", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/check.py", line 70, in check
base.execute_cmdline_scenarios(scenario_name, args, command_args)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 94, in execute_cmdline_scenarios
get_configs(args, command_args, ansible_args, glob_str),
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 185, in get_configs
configs = [
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 186, in <listcomp>
config.Config(
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/config.py", line 64, in __call__
obj.after_init()
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/config.py", line 118, in after_init
self._validate()
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/config.py", line 456, in _validate
errors = schema_v3.validate(self.config)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/model/schema_v3.py", line 61, in validate
with open(schema_file, encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/py310/lib/python3.10/site-packages/molecule_vagrant/driver.json'
$ pip3 uninstall molecule-vagrant
[...]
$ molecule check
WARNING vagrant driver is not installed.
[...]
@konstruktoid
Copy link
Author

@konstruktoid
Copy link
Author

$ python3 -m pip install -U virtualenv
$ virtualenv -p /usr/bin/python3.10 ~/py310
$ source ~/py310/bin/activate
$ python3 -m pip install -U pip
$ python3 -m pip install --upgrade --force-reinstall ansible-core ansible-lint molecule molecule-plugins "molecule-plugins[vagrant]@git+https://github.com/ansible-community/molecule-plugins.git"
$ molecule check
WARNING vagrant driver is not installed.

@konstruktoid
Copy link
Author

$ molecule test --destroy=never
WARNING vagrant driver is not installed.
INFO default scenario test matrix: dependency, lint, cleanup, destroy, syntax, create, prepare, converge, idempotence, side_effect, verify, cleanup, destroy
INFO Performing prerun with role_name_check=0...
INFO Running ansible-galaxy collection install -v -r requirements.yml
INFO Set ANSIBLE_LIBRARY=/home/ubuntu/.cache/ansible-compat/ca6d44/modules:/home/ubuntu/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_ROLES_PATH=/home/ubuntu/.cache/ansible-compat/ca6d44/roles:/home/ubuntu/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /home/ubuntu/.cache/ansible-compat/ca6d44/roles/konstruktoid.docker_rootless symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO Running default > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
Traceback (most recent call last):
File "/home/ubuntu/py310/bin/molecule", line 8, in
sys.exit(main())
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/py310/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/test.py", line 113, in test
base.execute_cmdline_scenarios(scenario_name, args, command_args, ansible_args)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 119, in execute_cmdline_scenarios
execute_scenario(scenario)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 162, in execute_scenario
execute_subcommand(scenario.config, action)
File "/home/ubuntu/py310/lib/python3.10/site-packages/molecule/command/base.py", line 143, in execute_subcommand
command_module = getattr(molecule.command, subcommand)
AttributeError: module 'molecule.command' has no attribute 'lint'. Did you mean: 'list'?

@konstruktoid
Copy link
Author

$ python3 -m pip freeze
ansible-compat==3.0.2
ansible-core==2.14.5
ansible-lint==6.15.0
arrow==1.2.3
attrs==23.1.0
binaryornot==0.4.4
black==23.3.0
bracex==2.3.post1
certifi==2022.12.7
cffi==1.15.1
chardet==5.1.0
charset-normalizer==3.1.0
click==8.1.3
click-help-colors==0.9.1
cookiecutter==2.1.1
cryptography==40.0.2
enrich==1.2.7
filelock==3.12.0
idna==3.4
Jinja2==3.1.2
jinja2-time==0.2.0
jsonschema==4.17.3
markdown-it-py==2.2.0
MarkupSafe==2.1.2
mdurl==0.1.2
molecule==5.0.0
molecule-plugins @ git+https://github.com/ansible-community/molecule-plugins.git@7498e81fdb3159243c59f51306ff2b48f024da92
mypy-extensions==1.0.0
packaging==23.1
pathspec==0.11.1
platformdirs==3.2.0
pluggy==1.0.0
pycparser==2.21
Pygments==2.15.1
pyrsistent==0.19.3
python-dateutil==2.8.2
python-slugify==8.0.1
python-vagrant==1.0.0
PyYAML==6.0
requests==2.28.2
resolvelib==0.8.1
rich==13.3.4
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
six==1.16.0
subprocess-tee==0.4.1
text-unidecode==1.3
tomli==2.0.1
urllib3==1.26.15
wcmatch==8.4.1
yamllint==1.31.0

@konstruktoid
Copy link
Author

python3 -m pip install --upgrade --force-reinstall ansible-core ansible-lint molecule==4.0.4 molecule-plugins==23.0.0 "molecule-plugins[vagrant]==23.0.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment