Hi all,
I'm writing a recipe for mariadb. It all works (I think, if you see
any mistakes other then my question, feel free to point them out ;) ),
except for the gpg key adding. Can anyone tell me what I'm doing
wrong?
define debian::apt::key($ensure, $apt_key_url = "http://
www.example.com/apt/keys") {
case $ensure {
"present": {
exec { "apt-key present $name":
command => "/usr/bin/wget -q
$apt_key_url/$name -O -|/usr/bin/apt-key add -",
unless => "/usr/bin/apt-key list|/bin/
grep -c $name",
}
}
"absent": {
exec { "apt-key absent $name":
command => "/usr/bin/apt-key del
$name",
onlyif => "/usr/bin/apt-key list|/bin/
grep -c $name",
}
}
default: {
fail "Invalid 'ensure' value '$ensure' for
apt::key"
}
}
}
class debian::apt {
file { "/etc/apt/sources.list":
owner => "root",
group => "root",
mode => 0444,
content => template("common/sources.list.erb"),
}
exec {"/usr/bin/apt-get -q -q update":
refreshonly => true,
subscribe => File["/etc/apt/sources.list"],
require => File["/etc/apt/sources.list"],
}
debian::apt::key { "ourdelta":
ensure => "present",
apt_key_url => "http://ourdelta.org/deb/
ourdelta.gpg"
}
}
And it's called as follows:
class common{
# make sure all servers have an appropriate apt sources.list
include debian::apt
<..snip..>
}
node "yadda" {
include common
}
Can anybody tell me what i did wrong?
thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.