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

Add filename option to apt repository add #368

Closed
wants to merge 1 commit into from

Conversation

kaysond
Copy link
Contributor

@kaysond kaysond commented Aug 9, 2022

Addresses #335 and #101 (i.e. I'd say it's technically a work around as opposed to a solution)

@stale
Copy link

stale bot commented Nov 12, 2022

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

@stale stale bot added the stale label Nov 12, 2022
@kaysond
Copy link
Contributor Author

kaysond commented Nov 12, 2022

Not stale

@stale
Copy link

stale bot commented Nov 12, 2022

This issue is no longer marked for closure.

@stale stale bot removed the stale label Nov 12, 2022
@stale
Copy link

stale bot commented Feb 18, 2023

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

@stale stale bot added the stale label Feb 18, 2023
@kaysond
Copy link
Contributor Author

kaysond commented Feb 18, 2023

not stale (unless superseded by #369)

@stale
Copy link

stale bot commented Feb 18, 2023

This issue is no longer marked for closure.

@stale stale bot removed the stale label Feb 18, 2023
README.md Outdated
@@ -56,6 +56,7 @@ The main Docker repo URL, common between Debian and RHEL systems.
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
docker_apt_ignore_key_error: True
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg"
docker_apt_filename: omit
Copy link
Owner

Choose a reason for hiding this comment

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

For this option, could you just put instead of omit, custom-filename-here-if-desired or something that would be a more practical example. Or maybe we could leave it empty in defaults/main.yml instead, that might be preferable (docker_apt_filename: '', and then document that value here, so it is more obvious it should be a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree that the latter is probably preferable. Unfortunately, it seems like you can't give an empty string for that argument. This PR fail CI, but #369, which has a non-empty string, passes CI.

We could hack around it with something like filename: {{ docker_apt_filename if docker_apt_filename != "" else omit }}, assuming that works.

Alternatively, it may make more sense to just close this in favor of #369, if you plan on releasing 7.0.0 soon. This PR is mainly intended as a temporary fix until the defaults get updated anyway.

@stale
Copy link

stale bot commented Jun 18, 2023

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

@stale stale bot added the stale label Jun 18, 2023
@kaysond
Copy link
Contributor Author

kaysond commented Jun 18, 2023

not stale

@stale
Copy link

stale bot commented Jun 18, 2023

This issue is no longer marked for closure.

@stale stale bot removed the stale label Jun 18, 2023
@dsegurag
Copy link

@geerlingguy, @kaysond what if we add something like filename: "{{ docker_apt_filename | default(omit) }}", and we don't need to set anything under "default" folder:

- name: Add Docker repository.
  apt_repository:
    repo: "{{ docker_apt_repository }}"
    filename: "{{ docker_apt_filename | default(omit) }}"
    state: present
    update_cache: true
  when: docker_add_repo | bool

It's backward compatible with the current code. For next major version we can set a name (maybe "docker") for the file, but meanwhile people can start changing it to the desired name.

@kaysond
Copy link
Contributor Author

kaysond commented Sep 28, 2023

Superseded by #369

@kaysond kaysond closed this Sep 28, 2023
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.

3 participants