Class: Specinfra::Command::Amazon::V2022::Yumrepo

Inherits:
Redhat::Base::Yumrepo show all
Defined in:
lib/specinfra/command/amazon/v2022/yumrepo.rb

Class Method Summary collapse

Methods inherited from Redhat::Base::Yumrepo

create

Methods inherited from Base

create, escape

Class Method Details

.check_exists(repository) ⇒ Object



3
4
5
# File 'lib/specinfra/command/amazon/v2022/yumrepo.rb', line 3

def check_exists(repository)
  "dnf repolist all | grep -qsE \"^[\\!\\*]?#{escape(repository)}\(\\s\|$\|\\/)\""
end

.check_is_enabled(repository) ⇒ Object



7
8
9
# File 'lib/specinfra/command/amazon/v2022/yumrepo.rb', line 7

def check_is_enabled(repository)
  "dnf repolist enabled | grep -qs \"^[\\!\\*]\\?#{escape(repository)}\""
end