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

Avoid reinstalling dependencies #3979

Merged

Conversation

zhan9san
Copy link
Contributor

@zhan9san zhan9san commented Jul 28, 2023

With this PR, if dependencies exist, we don't need to talk to galaxy.ansible.com every time by default.

Technically, it can be done via an explicit definition as below.

dependency:
  name: galaxy
  options:
    requirements-file: requirements.yml
    force: false

Compare

If we define community.docker as a dependency,

Before

Opened /Users/jackzhang/.ansible/galaxy_token
Collection 'community.docker:3.4.8' obtained from server default https://galaxy.ansible.com/api/
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/download/community-docker-3.4.8.tar.gz to /Users/jackzhang/.ansible/tmp/ansible-local-908270jolbbei/tmp8p2pq2qd/community-docker-3.4.8-ktwznndg
Installing 'community.docker:3.4.8' to '/Users/jackzhang/.ansible/collections/ansible_collections/community/docker'
community.docker:3.4.8 was installed successfully
INFO     Dependency completed successfully.
WARNING  Skipping, missing the requirements file.

After

Starting galaxy collection install process
Nothing to do. All requested collections are already installed. If you want to reinstall them, consider using `--force`.
INFO     Dependency completed successfully.
WARNING  Skipping, missing the requirements file.

@zhan9san zhan9san requested review from a team as code owners July 28, 2023 15:32
@zhan9san zhan9san added the bug label Jul 28, 2023
@zhan9san zhan9san force-pushed the feature/avoid-reinstalling-dependencies branch from f6124f8 to 9633a40 Compare July 31, 2023 01:56
Signed-off-by: Jack Zhang <jack4zhang@gmail.com>
@audgirka audgirka force-pushed the feature/avoid-reinstalling-dependencies branch from 9633a40 to 7ece309 Compare July 31, 2023 13:04
@audgirka audgirka merged commit 7f2f24e into ansible:main Jul 31, 2023
15 checks passed
@zhan9san zhan9san deleted the feature/avoid-reinstalling-dependencies branch July 31, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants