class Chef::Resource::RhsmRepo

Public Instance Methods

repo_enabled?(repo) click to toggle source
# File lib/chef/resource/rhsm_repo.rb, line 57
def repo_enabled?(repo)
  cmd = Mixlib::ShellOut.new("subscription-manager repos --list-enabled", env: { LANG: "en_US" })
  cmd.run_command
  !cmd.stdout.match(/Repo ID:\s+#{repo}$/).nil?
end