Sha256: 6ac5b043dc1bc9f6f6bfa53b52e0177ceb58f0238e7f7093480a27ff44f91faa

Contents?: true

Size: 588 Bytes

Versions: 7

Compression:

Stored size: 588 Bytes

Contents

# force.pp
# force a package from a specific release

define apt::force(
  $release = 'testing',
  $version = false,
  $timeout = 300
) {

  $version_string = $version ? {
    false   => undef,
    default => "=${version}",
  }

  $install_check = $version ? {
    false   => "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'",
    default => "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'",
  }
  exec { "/usr/bin/aptitude -y -t ${release} install ${name}${version_string}":
    unless    => $install_check,
    logoutput => 'on_failure',
    timeout   => $timeout,
  }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
service_kiosk-0.5.6 provision/modules/apt/manifests/force.pp
service_kiosk-0.5.5 provision/modules/apt/manifests/force.pp
service_kiosk-0.5.4 provision/modules/apt/manifests/force.pp
service_kiosk-0.5.3 provision/modules/apt/manifests/force.pp
service_kiosk-0.5.2 provision/modules/apt/manifests/force.pp
service_kiosk-0.5.1 provision/modules/apt/manifests/force.pp
service_kiosk-0.5.0 provision/modules/apt/manifests/force.pp