简体   繁体   中英

Artifactory Unable to find module with librarian-puppet

I'm trying to use the librarian-puppet to fetch forge modules from an Artifactory repository.

In my Puppetfile I have something like:

forge "https://<artifactory_host>/artifactory/api/puppet/<repo_key>" #From artifactory docs

# PuppetLabs Modules
mod 'puppetlabs/stdlib',           '4.24.0'

The command that I'm using is /usr/local/bin/pdk bundle -- exec librarian-puppet install --no-use-v1-api --verbose

The error that I get is:

[Librarian] Resolving puppetlabs-stdlib (= 4.24.0) <https://<artifactory_host>/artifactory/api/puppet/<repo_key>>
[Librarian]   Checking manifests Unable to find module 'puppetlabs-stdlib' on https://<artifactory_host>/artifactory/api/puppet/<repo_key>
/tmp/tmp.BXyhBoNRiR/.pdk/cache/ruby/2.1.0/gems/librarian-puppet-3.0.0/lib/librarian/puppet/source/forge/repo_v3.rb:44:in `rescue in get_module'
/tmp/tmp.BXyhBoNRiR/.pdk/cache/ruby/2.1.0/gems/librarian-puppet-3.0.0/lib/librarian/puppet/source/forge/repo_v3.rb:41:in `get_module'

Versions:

  • puppet 3.8.7
  • pdk 1.5.0
  • ruby 2.1.9

According to the documentation at https://www.jfrog.com/confluence/display/RTF/Puppet+Repositories#PuppetRepositories-Usinglibrarian-puppet , it seems I'm trying to get the modules correctly using the librarian-puppet, but something most be missing.

Thanks for any help.

I think Artifacotry does not support Puppet 3.8.7 its documented in Wiki.

Puppet version support

Puppet does not support a context path up to version 4.9.1, we recommend using Artifactory with Puppet version 4.9.2 and above. Please see below if you are using Puppet 4.9.1 and below.

The official Artifactory documentation (not a wiki) recommends using Puppet 4.9.2 or later with Artifactory:

Puppet version support

Puppet does not support a context path up to version 4.9.1, we recommend using Artifactory with Puppet version 4.9.2 and above. Please see below if you are using Puppet 4.9.1 and below.

(Emphasis in the original.)

As that comment indicates, however, the docs do also suggest a workaround for use with earlier Puppet :

If you need to use Puppet 4.9.1 and below you can use a workaround which uses NGINX or Apache to rewrite all requests from /v3/* to /artifactory/api/puppet/<repo-name>/v3/* .

The docs go on to present some example configurations, which I will not repeat here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM