Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show puppet module versions
#!/usr/bin/env ruby
require 'librarian/puppet'
librarian_environment = Librarian::Puppet::Environment.new(pwd: 'Puppetfile.lock')
librarian_environment.lock.manifests.sort_by { |manifest| manifest.name.split('-').last }.each do |manifest|
author, name = manifest.name.split('-')
if ['theforeman', 'katello'].include?(author)
branch = "#{manifest.version.to_s.split('.')[0..1].join('.')}-stable"
puts "puppet-#{name} #{branch} #{manifest.version}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.