Puppet Function: get_latest_vagrant_version
- Defined in:
- lib/puppet/parser/functions/get_latest_vagrant_version.rb
- Function type:
- Ruby 3.x API
Overview
5 6 7 8 9 |
# File 'lib/puppet/parser/functions/get_latest_vagrant_version.rb', line 5 newfunction(:get_latest_vagrant_version, :type => :rvalue) do |args| # tags = JSON.parse(open('https://api.github.com/repos/mitchellh/vagrant/tags') { |u| u.read }) # tags.sort_by { |tag| tag['name'] }.last['name'][1..-1] JSON.parse(open('http://www.vagrantup.com/latest-version.json') { |u| u.read })["version"] end |