Class: Sprinkle::Installers::OpenbsdPkg

Inherits:
Installer show all
Defined in:
lib/sprinkle/installers/openbsd_pkg.rb

Overview

OpenBSD Package Installer

The Pkg package installer installs OpenBSD packages.

Example Usage

Installing the magic_beans package.

package :magic_beans do
  openbsd_pkg 'magic_beans'
end

You may also specify multiple packages as an array:

package :magic_beans do
  openbsd_pkg %w(magic_beans magic_sauce)
end

Notes

Before OpenBSD packages can be installed, the PKG_PATH environment variable must be set.

You must set PKG_PATH in ~/.ssh/environment on the remote system and enable ‘PermitUserEnvironment yes’ in /etc/ssh/sshd_config

For help on PKG_PATH see section 15.2.2 of the OpenBSD FAQ (www.openbsd.org/faq/faq15.html)

Instance Attribute Summary collapse

Attributes inherited from Installer

#delivery, #options, #package, #post, #pre

Attributes included from Configurable

#delivery

Instance Method Summary collapse

Methods inherited from Installer

#process

Methods included from Configurable

#assert_delivery, #defaults, #method_missing, #option?

Constructor Details

#initialize(parent, packages, &block) ⇒ OpenbsdPkg

:nodoc:



33
34
35
36
37
# File 'lib/sprinkle/installers/openbsd_pkg.rb', line 33

def initialize(parent, packages, &block) #:nodoc:
  super parent, &block
  packages = [packages] unless packages.is_a? Array
  @packages = packages
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sprinkle::Configurable

Instance Attribute Details

#packagesObject

:nodoc:



31
32
33
# File 'lib/sprinkle/installers/openbsd_pkg.rb', line 31

def packages
  @packages
end