Hi all,
I'm trying to figure out how to automatically configure my nodes with
amanda backup client.
What I want to achieve is that the server have an entry created in the
/etc/amanda/(Daily|Weekly|Monthly)/disklist.conf file on the server.
The disklist.conf file lists entries like so:
nodename partition alias {
a
bunch
of
vars
}
anothernodename partition alias {
a
bunch
of
vars
}
I want that to come from a 'role' class assignment - ie, a webserver has
the webserver role and has a backup template.
I was hoping to use a define like so:
define amanda::client::takebackup ($type, $period, $compress = undef) {
# take the hostname from the name var.
$myhost = $name
@@file { "/etc/amanda/$period/disklist.conf":
ensure => present,
owner => "amandabackup",
group => "disk",
mode => 0600,
content => template("amanda/$period/$type.erb"),
tag => amandabackupdisklist,
}
} #end define
And activate the resource like so:
devel_buildserver.pp:
class roles::devel_buildserver {
include amanda::client
amanada::client::takebackup { $fqdn:
type => "dev_build",
period => "Daily",
compress => false,
}
} #end class
The erb is like so:
dev_build.erb:
# This is a puppet controlled disklist file for dev_build
<%= myhost %> "/" "/" {
zmc_unix_base
encrypt none
<% if has_variable?("compress") then -%>
compress client best
<% else -%>
compress none
<% end -%>
estimate calcsize server
property "zmc_type" "unix"
property "zmc_disklist" "Daily"
property "zmc_version" "3"
property "zmc_extended_attributes" "gtar"
property "zmc_amanda_app" "gtar"
property "zmc_show_advanced" "on"
property "creation_time" "2011-04-19 23:38:01"
property "zmc_occ" "33438030906"
property "last_modified_time" "2011-04-20 18:56:43"
exclude "/proc,/srv,/sys"
property "zmc_amcheck_date" "20110420185643"
zmc_gtar_app
}
Then in the server class I wanted to realize the resource like so:
class amanda::server {
...
some other stuff
...
File <<| tag == 'amandabackupdisklist' |>>
}
This is not working. The file is not being realized on the server node. I
don't think the way I've gone about it will ever work though the way I
first thought - hence this call for help... :)
How can I get this to work? What has got me especially worried is the
appending of node data to the disklist.conf file - how to do that?
Cheers,
Den
--
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.