Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

CI runs started failing on ansible devel install due to new installation warning #167

Closed
geerlingguy opened this issue Jul 20, 2020 · 4 comments · Fixed by #168
Closed

Comments

@geerlingguy
Copy link
Collaborator

SUMMARY

CI test runs are now failing on the molecule job with the following:

    RuntimeError:

        ****************************************************************************

        Cannot install ansible-base with a pre-existing ansible==2.9.10
        installation.

        Installing ansible-base with ansible-2.9 or older currently installed with
        pip is known to cause problems. Please uninstall ansible and install the new
        version:

            pip uninstall ansible
            pip install ansible-base

        If you want to skip the conflict checks and manually resolve any issues
        afterwards, set the ANSIBLE_SKIP_CONFLICT_CHECK environment variable:

            ANSIBLE_SKIP_CONFLICT_CHECK=1 pip install ansible-base
        ****************************************************************************
ISSUE TYPE
  • Bug Report
COMPONENT NAME

CI - GitHub Actions

ANSIBLE VERSION
ansible-base
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

STEPS TO REPRODUCE

Look at CI builds: https://github.com/ansible-collections/community.kubernetes/runs/891624024?check_suite_focus=true

EXPECTED RESULTS

N/A

ACTUAL RESULTS

N/A

@geerlingguy
Copy link
Collaborator Author

Hmm... it seems that molecule is requiring a 'stable' version of Ansible, and not detecting that ansible base 2.11.0 meets that requirement?

Collecting ansible>=2.8
  Downloading ansible-2.9.10.tar.gz (14.2 MB)

See: https://github.com/ansible-collections/community.kubernetes/pull/168/checks?check_run_id=891671654#step:6:39

This is causing a new error since ansible-base was installed but Pip installed ansible-2.9.10 on top of it when installing molecule:

ERROR! Unexpected Exception, this is probably a bug: cannot import name 'AnsibleCollectionLoader' from 'ansible.utils.collection_loader' (/opt/hostedtoolcache/Python/3.7.8/x64/lib/python3.7/site-packages/ansible/utils/collection_loader/__init__.py)

@geerlingguy
Copy link
Collaborator Author

Well, after manually uninstalling and reinstall ansible, I get the following from Molecule:

pkg_resources.DistributionNotFound: The 'ansible' distribution was not found and is required by the application

@geerlingguy
Copy link
Collaborator Author

Opened an upstream issue: ansible/molecule#2757

geerlingguy added a commit that referenced this issue Jul 23, 2020
Fixes #167: Re-order ansible installation so it doesn't break on molecule test.
@geerlingguy
Copy link
Collaborator Author

Fix for now is to stick with stable Ansible 2.9.x, unfortunately... we'll switch back to base once the molecule issue linked above is fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant