Created
December 5, 2013 15:59
-
-
Save glarizza/7807991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Iterate through list of packages | |
| IO.popen('repoquery --installed -a --qf \'%{name} %{version}\'').readlines.map(&:chomp).each do |line| | |
| name, version = line.split | |
| Facter.add("yum_#{name}_version") do | |
| setcode do | |
| version | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment