blob: 2fd346e393c5fd510384436b7f788617b7f91284 (
plain) (
tree)
|
|
define aur::package (
$ensure = 'present',
) {
case $ensure {
'present': {
exec { "pacman::aur::install::${name}":
cwd => "/tmp",
require => Class[aur::aura],
command => "/usr/bin/aura -A ${name}",
user => "aur-builder",
unless => "/usr/bin/aura -Qk ${name}",
logoutput => 'on_failure',
timeout => 1800,
}
}
'absent': {
exec { "pacman::aur::remove::${name}":
cwd => "/tmp",
require => Class[aur::aura],
command => "/usr/bin/aura -Rs ${name}",
user => "aur-builder",
onlyif => "/usr/bin/aura -Qi ${name}",
logoutput => 'on_failure',
}
}
default: {
fail("Pacman::Aur[${name}] ensure parameter must be either 'present' or 'absent'")
}
}
}
|