Module: Prepper::Tools::Apt
- Included in:
- Package
- Defined in:
- lib/prepper/tools/apt.rb
Overview
Helper methods to interact with Apt
Instance Method Summary collapse
-
#apt_install(packages) ⇒ Object
Installs packages.
-
#apt_update ⇒ Object
Updates apt repositories.
-
#has_apt_package?(package) ⇒ Boolean
Verifier command to checks if an apt package is installed.
Instance Method Details
#apt_install(packages) ⇒ Object
Installs packages
12 13 14 15 16 |
# File 'lib/prepper/tools/apt.rb', line 12 def apt_install(packages) packages.each do |package| @commands << Command.new("apt install --force-yes -qyu #{package}", sudo: true, verify: has_apt_package?(package)) end end |