4

I use Vagrant with Puppet. My Puppetfile looks like this:

forge "http://forge.puppetlabs.com"
mod 'willdurand/nodejs'
# ...

I use librarian-puppet v1.1.2 to download necessary dependencies for Puppet. Recenlty the tool started to display warnings during provision:

Replacing Puppet Forge API URL to use v3 https://forgeapi.puppetlabs.com. 
You should update your Puppetfile

Replacing the first Puppetfile line with forge "https://forgeapi.puppetlabs.com" does not solve the problem. How exacly am I supposed to update my Puppetfile to get rid of these warnings?


After I have updated the forge.rb script, as @AndreiFecioru suggested:

if uri =~ %r{^http(s)?://forge\.puppetlabs\.com}
  puts "---------------> #{uri}"
  uri = "https://forgeapi.puppetlabs.com"
  warn { "Replacing Puppet Forge API URL to use v3 #{uri}. You should update your Puppetfile" }
end

the output is as follows:

$sudo librarian-puppet update
---------------> http://forge.puppetlabs.com
Replacing Puppet Forge API URL to use v3 https://forgeapi.puppetlabs.com. You should update your Puppetfile
...

I have no idea why the URL there is different than in my Puppetfile. I tried to remove the Puppetfile.lock and run librarian-puppet install again - warnings are still displayed.

fracz
  • 20,536
  • 18
  • 103
  • 149

2 Answers2

2

What version of the librarian-puppet gem are you using? I got the same warning message, switched to the "v3" form (forge "https://forgeapi.puppetlabs.com") and it worked fine (no more warning messages).

After a quick Google search I noticed that this issue got fixed in version 1.1.0 of the gem (see this thread here: https://github.com/rodjek/librarian-puppet/issues/210). I am using version 1.1.2 of the librarian-puppet gem and it seems ok.

  • My version is 1.1.2 too, but the warning still is displayed during provision. – fracz Jun 29 '14 at 15:54
  • Usually what I do at this point is go directly into the code. In your case, you are looking for the `forge.rb` file. On my system (ubuntu 12.04 LTS) this file is located at: `/var/lib/gems/1.9.1/gems/librarian-puppet-1.1.2/lib/librarian/puppet/source/forge.rb`. Go to line 55 and place the following line there: `puts "---------------> #{uri}"`. Run the `librarian-puppet update` command again and see what the value of the input URI actually is. – Andrei Fecioru Jun 29 '14 at 18:16
1

Probably one of your dependencies is using the old forge "http://forge.puppetlabs.com" line.

It's just a warning and can be ignored.

csanchez
  • 1,623
  • 11
  • 20