Sha256: ef752c884fbc99fbc10cbd58ba0472d9aa8b2c100807ba606c2b8131735bc3f3

Contents?: true

Size: 587 Bytes

Versions: 20

Compression:

Stored size: 587 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/apt-get -y -t ${release} install ${name}${version_string}":
    unless    => $install_check,
    logoutput => 'on_failure',
    timeout   => $timeout,
  }
}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
freighthop-0.6.1 modules/apt/manifests/force.pp
freighthop-0.6.0 modules/apt/manifests/force.pp
freighthop-0.5.2 modules/apt/manifests/force.pp
freighthop-0.5.1 modules/apt/manifests/force.pp
freighthop-0.5.0 modules/apt/manifests/force.pp
freighthop-0.4.1 modules/apt/manifests/force.pp
freighthop-0.4.0 modules/apt/manifests/force.pp
freighthop-0.3.3 modules/apt/manifests/force.pp
freighthop-0.3.2 modules/apt/manifests/force.pp
freighthop-0.3.1 modules/apt/manifests/force.pp
freighthop-0.3.0 modules/apt/manifests/force.pp
freighthop-0.2.1 modules/apt/manifests/force.pp
freighthop-0.2.0 modules/apt/manifests/force.pp
freighthop-0.1.0 modules/apt/manifests/force.pp
freighthop-0.0.6 modules/apt/manifests/force.pp
freighthop-0.0.5 modules/apt/manifests/force.pp
freighthop-0.0.4 modules/apt/manifests/force.pp
freighthop-0.0.3 modules/apt/manifests/force.pp
freighthop-0.0.2 modules/apt/manifests/force.pp
freighthop-0.0.1 modules/apt/manifests/force.pp