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

Deploying multiple gpgkey in one repo #278

Merged
merged 3 commits into from
Nov 9, 2022

Conversation

teluq-pbrideau
Copy link

Pull Request (PR) description

The yum repository format should support entering multiple keys in the gpgkey entry, like the following entry for gitlab:

[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
       https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

Currently, this module only deploy the first gpgkey it encounter. This change allow to deploy multiples gpg keys (separated by any white spaces), for example:

class { 'yum' :
  managed_repos => ['gitlab'],
  gpgkeys       => {
    '/etc/pki/rpm-gpg/RPM-GPG-KEY-gitlab'                  => { source => 'https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey' },
    '/etc/pki/rpm-gpg/RPM-GPG-KEY-gitlab-3D645A26AB9FBD22' => { source => 'https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg' },
  },
  repos         => {
    'gitlab' => {
      [...]
      'gpgkey' => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-gitlab file:///etc/pki/rpm-gpg/RPM-GPG-KEY-gitlab-3D645A26AB9FBD22',
    },
}

@teluq-pbrideau
Copy link
Author

I’m not sure, but does this PR fixes #116? It seems old

@jhoblitt jhoblitt added the enhancement New feature or request label Nov 8, 2022
Copy link
Member

@jhoblitt jhoblitt left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me. I think it is ready for merge with some minor reformatting.

spec/classes/init_spec.rb Outdated Show resolved Hide resolved
spec/classes/init_spec.rb Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
@jhoblitt
Copy link
Member

jhoblitt commented Nov 9, 2022

This LGTM to me now. Thank you for contributing.

@jhoblitt jhoblitt merged commit 509172d into voxpupuli:master Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants