mirror of
https://github.com/krislamo/pup-tests
synced 2024-11-14 02:20:35 +00:00
Kris Lamoureux
555304661b
On "./pup-tests.sh create" SSH keys will be created and placed on the webserver and backup server to allow the backup server to restore files back to the webserver easily.
36 lines
719 B
Puppet
36 lines
719 B
Puppet
class amanda::client {
|
|
|
|
# Install Amanda
|
|
package { ['amanda-client', 'amanda-common']:
|
|
ensure => present
|
|
}
|
|
|
|
# Enable "backup" user account
|
|
user { 'backup':
|
|
ensure => present,
|
|
shell => "/bin/bash"
|
|
}
|
|
|
|
# Enable remote access from backup server
|
|
file { '/var/backups/.ssh':
|
|
ensure => directory
|
|
}
|
|
|
|
# Deploy temporary backup key made by pup-tests.sh
|
|
file { '/var/backups/.ssh/authorized_keys':
|
|
ensure => file,
|
|
content => file('amanda/backup-key.pub'),
|
|
owner => 'backup',
|
|
mode => "644"
|
|
}
|
|
|
|
# Deploy amanda hosts for clients
|
|
file { '/etc/amandahosts':
|
|
ensure => file,
|
|
content => template('amanda/amandahosts-client.epp'),
|
|
owner => "backup"
|
|
}
|
|
|
|
}
|
|
|