Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#67155 - [molecule-vagrant] Missing its playbooks

Attached to Project: Community Packages
Opened by Marc Straube (durag) - Tuesday, 30 June 2020, 15:26 GMT
Last edited by Ike Devolder (BlackEagle) - Wednesday, 27 October 2021, 20:22 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

It is not possible to run molecule tests when using the vagrant driver. The box neither gets downloaded nor started, because the associated playbooks cannot be found.


If "molecule test" is run, the converge playbook ends with the following message:
-------------------------------------------
--> Action: 'create'
Skipping, create action has no playbook.
--> Scenario: 'default'
--> Action: 'prepare'
Skipping, prepare playbook not configured.
--> Scenario: 'default'
--> Action: 'converge'

PLAY [Converge] ****************************************************************

TASK [Gathering Facts] *********************************************************
fatal: [instance]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname instance: Name or service not known", "unreachable": true}

PLAY RECAP *********************************************************************
instance : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0



Additional info:

* package versions:
- molecule 3.0.4-3
- molecule-vagrant 0.2-1

* link to upstream bug report, if any:
There has been an upstream bug prior to version 0.2: https://github.com/ansible-community/molecule-vagrant/issues/8

Steps to reproduce:

You can reproduce the bug with the following files:

myrole/molecule/default/molecule.yml
-------------------------------------------

dependency:
name: galaxy
driver:
name: vagrant
provider:
name: virtualbox
platforms:
- name: instance
box: archlinux/archlinux
provisioner:
name: ansible
config_options:
defaults:
interpreter_python: auto_silent
verifier:
name: ansible
-------------------------------------------



myrole/molecule/default/converge.yml
-------------------------------------------

---
- name: Converge
hosts: all
roles:
- myrole



myrole/tasks/main.yml
-------------------------------------------

---
- debug:
msg: I'm here

This task depends upon

Closed by  Ike Devolder (BlackEagle)
Wednesday, 27 October 2021, 20:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  update 0.6.3 in community
Comment by Marc Straube (durag) - Tuesday, 30 June 2020, 15:32 GMT
Because of the missing indentation of the files in my report I've added an archive which contains the test role.
Comment by Simon Wydooghe (HyperBaton) - Tuesday, 13 October 2020, 15:37 GMT
I can confirm this behavior, a pip installed molecule-vagrant fixed the issue for me for now.
Comment by Lex Onderwater (ReLaxLex) - Thursday, 14 January 2021, 14:33 GMT
using a virtualenv and do a pip install molecule-vagrant, will install version 0.6.1 of the package which is working because the required playbooks are there. Please upgrade molecule-vagrant to version the latest version.
Comment by Marc Straube (durag) - Saturday, 13 March 2021, 01:08 GMT
You can find my fixed PKGBUILD for version 0.6.1 as attachment.
   PKGBUILD (1.2 KiB)
Comment by Christian Rebischke (Shibumi) - Saturday, 13 March 2021, 17:19 GMT
@Marc Straube

Sorry, your PKGBUILD doesn't work:

----------

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpfkd4vx5y', '--quiet', 'toml']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/build/molecule-vagrant/src/molecule-vagrant-0.6.1/setup.py", line 12, in <module>
setuptools.setup(
File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 687, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
dist = best[req.key] = env.best_match(
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
return installer(requirement)
File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 746, in fetch_build_egg
return fetch_build_egg(self, req)
File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpfkd4vx5y', '--quiet', 'toml']' returned non-zero exit status 1.

----------

Any idea? Did you test your pkgbuild in a clean environment?
Comment by Marc Straube (durag) - Saturday, 13 March 2021, 19:40 GMT
Hi Christian,

of course I did not built it in a clean chroot. I'm sorry for that! You learn something new every day ;)

Here is the fixed PKGBUILD. It was missing python-pip as make dependency.
   PKGBUILD (1.2 KiB)
Comment by Renato Caldas (rmsc) - Thursday, 13 May 2021, 14:33 GMT
This PKGBUILD does work, thanks!

The package in community is WAY outdated, any idea when this is going to be merged?
Comment by Marc Straube (durag) - Thursday, 10 June 2021, 23:50 GMT
Update to 0.6.3
   PKGBUILD (1.2 KiB)
Comment by Ike Devolder (BlackEagle) - Wednesday, 27 October 2021, 20:22 GMT
I have added myself as comaintainer and pushed 0.6.3 towards community, Thanks @durag for the updated PKGBUILD

Loading...