Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't define Ansible dependency roles twice #7

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

wsmirnow
Copy link
Contributor

@wsmirnow wsmirnow commented Jan 31, 2025

As the Ansible depencency roles are defined in meta/main.yml, we don't need defining them twice in requirements.yml.

How to test:

  1. Change to an empty directory
  2. Create and enable python venv
  3. Install Ansible via pip
  4. Make sure Ansible role elan.opencast_repository is not installed
  5. Create requirements.yml with following content
---
roles:
  - name: elan.opencast_opensearch
    src: https://github.com/elan-ev/opencast_opensearch
    version: ansible-galaxy-should-install-dependencies
  1. Install Ansible roles with ansible-galaxy install -r requirements.yml -f

The elan.opencast_repository Ansible role should also be installed.

@wsmirnow wsmirnow force-pushed the ansible-galaxy-should-install-dependencies branch from 0c9f260 to 6bdd386 Compare January 31, 2025 13:33
@wsmirnow wsmirnow marked this pull request as draft January 31, 2025 13:39
@wsmirnow wsmirnow force-pushed the ansible-galaxy-should-install-dependencies branch 2 times, most recently from 426f309 to 12481d8 Compare January 31, 2025 13:57
@wsmirnow wsmirnow changed the title Ansible Galaxy should install all depencency roles Do not defiine Ansible depencency roles twice Jan 31, 2025
@wsmirnow wsmirnow marked this pull request as ready for review January 31, 2025 14:02
@wsmirnow wsmirnow changed the title Do not defiine Ansible depencency roles twice Don't define Ansible dependency roles twice Jan 31, 2025
@wsmirnow wsmirnow force-pushed the ansible-galaxy-should-install-dependencies branch 2 times, most recently from 7425ea6 to 8102452 Compare February 6, 2025 21:43
Since the Ansible dependency roles are defined in meta/main.yml, we don't need to define them twice in requirements.yml. But molecule don't read dependencies from meta/main.yml, so we need to put requirements.yml for the molecule.
@wsmirnow wsmirnow force-pushed the ansible-galaxy-should-install-dependencies branch from 8102452 to 8b203dd Compare February 6, 2025 21:54
@wsmirnow wsmirnow merged commit 640e44d into main Mar 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant