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

Allow to specify collection_cache in antsibull.cfg #375

Merged

Conversation

felixfontein
Copy link
Collaborator

@felixfontein felixfontein commented Dec 25, 2021

The --collection-cache option is available in some antsibull-docs and antsibull-build subcommands. Using it reduces the amount of bytes to download from galaxy.ansible.com a lot when similar commands are run multiple times.

This PR allows to specify the collection cache path in antsibull.cfg, so you can for example put the following into ~/.antsibull.cfg:

collection_cache = ~/.cache/antsibull/collections

(after doing mkdir -p ~/.cache/antsibull/collections).

Having this in the config for example allows to configure the cache for make webdocs without having to modify the build scripts in the ansible/ansible repo.

antsibull.cfg Outdated Show resolved Hide resolved
Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -48,3 +50,16 @@ def convert_bool(value):
value = _is_truthy_int(value)

return value


def convert_path(value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good addition! would have been annoying not to have support for this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially since the example mentions exactly this :D

@felixfontein felixfontein merged commit 0911e20 into ansible-community:main Dec 25, 2021
@felixfontein felixfontein deleted the collection-cache-config branch December 25, 2021 17:07
@felixfontein
Copy link
Collaborator Author

@briantist thanks for reviewing also this one! :)

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.

2 participants