blob: 074088e6861d101b0f63b7a64842de51797608cc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
define aur::install (
$ensure = 'present',
) {
case $ensure {
'present': {
exec { "pacman::aur::install::${name}":
require => Class[aur::aura],
command => "/usr/bin/aura -A ${name}",
unless => "/usr/bin/aura -Qk ${name}",
logoutput => 'on_failure',
timeout => 1800,
}
}
'absent': {
exec { "pacman::aur::remove::${name}":
require => Class[aur::aura],
command => "/usr/bin/aura -Rs ${name}",
onlyif => "/usr/bin/aura -Qi ${name}",
logoutput => 'on_failure',
}
}
default: {
fail("Pacman::Aur[${name}] ensure parameter must be either 'present' or 'absent'")
}
}
}
|