class Chef::Resource::RhsmRepo

Public Instance Methods

repo_enabled?(repo) click to toggle source
# File lib/chef/resource/rhsm_repo.rb, line 67
def repo_enabled?(repo)
  # FIXME: Add `env` support
  cmd = shell_out("subscription-manager repos --list-enabled", env: { LANG: "en_US" })
  repo == "*" || !cmd.stdout.match(/Repo ID:\s+#{repo}$/).nil?
end