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

Updated repo.pp to only install repo key if it is not already installed #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

palintir
Copy link

Modified exec{"apt_key_add_${normalized_name}":} for Debian installations to get the gpg key fingerprint of the repository and only add it if a key with the same fingerprintdoes not exist locally.

Modified exec{"apt_key_add_${normalized_name}":} for Debian installations to get the gpg key fingerprint of the repository and only add it if a key with the same fingerprintdoes not exist locally.
}

exec { "apt_get_update_${normalized_name}":
command => "apt-get update -o Dir::Etc::sourcelist=\"sources.list.d/${normalized_name}.list\" -o Dir::Etc::sourceparts=\"-\" -o APT::Get::List-Cleanup=\"0\"",
path => '/usr/bin/:/bin/',
require => Exec["apt_key_add_${normalized_name}"],
refreshonly => true,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure adding a refreshonly here will work. A lot of our users re-run their puppet configs as part of CI/CD pipeline and would expect the latest repository metadata to get pulled in. I think adding a refresh only here would prevent that update from happening.

@ice799
Copy link
Contributor

ice799 commented Mar 8, 2017

Hi! Thanks for sending this PR @palintir! The changes look fine to me except the refreshonly that I noted. I'm no expert on Puppet; I'm totally open to hearing your thoughts on my comment about refreshonly.

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 this pull request may close these issues.

2 participants