Serverspec 指定パッケージの存在をチェックするサンプル

環境
Serverspec
RHEL8.6

構文
describe package('パッケージ名’) do
it { should be_installed.by('xxx’) }
end
パッケージがインストールされていることを検証するにはpackageを利用します。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
describe package('awscli') do
it { should be_installed.by('pip') }
end
describe package('awscli') do it { should be_installed.by('pip') } end
describe package('awscli') do
  it { should be_installed.by('pip') }
end

 

Ansible

Posted by arkgame