Bacula-fd über puppet: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| (5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
*mkdir /etc/puppet/modules/bacula-fd/manifest | *mkdir /etc/puppet/modules/bacula-fd/manifest | ||
*mkdir /etc/puppet/modules/bacula-fd/files | *mkdir /etc/puppet/modules/bacula-fd/files | ||
cat /etc/puppet/manifest/site.pp | |||
<pre> | <pre> | ||
import 'nagios-nrpe-server' | |||
import 'bacula-fd' | |||
node default { | |||
include nagios-nrpe-server | |||
include bacula-fd | |||
} | |||
</pre> | </pre> | ||
*cat /etc/puppet/modules/bacula-fd/filescat /etc/puppet/modules/bacula-fd/files/bacula-fd.conf | |||
<pre> | |||
###################################################################################### | |||
# DIRECTOR | |||
###################################################################################### | |||
Director { | |||
Name = gondor.xinux.lan-dir | |||
Password = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |||
} | |||
Director { | |||
Name = gondor.xinux.lan-mon | |||
Password = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" | |||
Monitor = yes | |||
} | |||
###################################################################################### | |||
# FILEDAEMON | |||
###################################################################################### | |||
FileDaemon { | |||
Name = client | |||
FDport = 9102 | |||
WorkingDirectory = /var/lib/bacula | |||
Pid Directory = /var/run/bacula | |||
Maximum Concurrent Jobs = 20 | |||
FDAddress = 0.0.0.0 | |||
} | |||
###################################################################################### | |||
# FILEDAEMON | |||
###################################################################################### | |||
Messages { | |||
Name = Standard | |||
director = gondor.xinux.org-dir = all, !skipped, !restored | |||
} | |||
</pre> | |||
=erstellen der init.pp= | |||
*cat /etc/puppet/modules/bacula-fd/manifests/init.pp | |||
<pre> | |||
class bacula-fd { | |||
package { 'bacula-fd' : | |||
name => $operatingsystem ? { | |||
ubuntu => 'bacula-fd', | |||
archlinux => 'bacula-wes-ich-net' | |||
}, | |||
ensure => installed, | |||
} | |||
service { 'bacula-fd' : | |||
name => $operatingsystem ? { | |||
ubuntu => 'bacula-fd', | |||
archlinux => 'bacula-wes-ich-net' | |||
}, | |||
ensure => running, | |||
enable => true, | |||
require => Package['bacula-fd'], | |||
subscribe => File['/etc/bacula/bacula-fd.conf'], | |||
} | |||
file { '/etc/bacula/bacula-fd.conf': | |||
name => $operatingsystem ? { | |||
ubuntu => '/etc/bacula/bacula-fd.conf', | |||
archlinux => '/etc/bacula/bacula-wes-ich-net.conf' | |||
}, | |||
ensure => file, | |||
mode => 660, | |||
owner => root, | |||
group => root, | |||
source => 'puppet:///modules/bacula-fd/bacula-fd.conf', | |||
require => Package['bacula-fd'] | |||
} | |||
user {bacula: | |||
ensure => present, | |||
home => '/var/lib/bacula', | |||
shell => '/bin/false', | |||
require => Package['bacula-fd'] | |||
} | |||
group {bacula: | |||
ensure => present, | |||
require => Package['bacula-fd'] | |||
} | |||
} | |||
</pre> | |||
=apply= | |||
*puppet apply /etc/puppet/manifests/site.pp | |||
Notice: Compiled catalog for puppet.xinux.org in environment production in 0.18 seconds | |||
Notice: Finished catalog run in 0.19 seconds | |||
Aktuelle Version vom 21. Mai 2015, 15:24 Uhr
erstellen der modul verzeichnisse
- mkdir /etc/puppet/modules/bacula-fd
- mkdir /etc/puppet/modules/bacula-fd/manifest
- mkdir /etc/puppet/modules/bacula-fd/files
cat /etc/puppet/manifest/site.pp
import 'nagios-nrpe-server'
import 'bacula-fd'
node default {
include nagios-nrpe-server
include bacula-fd
}
- cat /etc/puppet/modules/bacula-fd/filescat /etc/puppet/modules/bacula-fd/files/bacula-fd.conf
######################################################################################
# DIRECTOR
######################################################################################
Director {
Name = gondor.xinux.lan-dir
Password = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Director {
Name = gondor.xinux.lan-mon
Password = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
Monitor = yes
}
######################################################################################
# FILEDAEMON
######################################################################################
FileDaemon {
Name = client
FDport = 9102
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
FDAddress = 0.0.0.0
}
######################################################################################
# FILEDAEMON
######################################################################################
Messages {
Name = Standard
director = gondor.xinux.org-dir = all, !skipped, !restored
}
erstellen der init.pp
- cat /etc/puppet/modules/bacula-fd/manifests/init.pp
class bacula-fd {
package { 'bacula-fd' :
name => $operatingsystem ? {
ubuntu => 'bacula-fd',
archlinux => 'bacula-wes-ich-net'
},
ensure => installed,
}
service { 'bacula-fd' :
name => $operatingsystem ? {
ubuntu => 'bacula-fd',
archlinux => 'bacula-wes-ich-net'
},
ensure => running,
enable => true,
require => Package['bacula-fd'],
subscribe => File['/etc/bacula/bacula-fd.conf'],
}
file { '/etc/bacula/bacula-fd.conf':
name => $operatingsystem ? {
ubuntu => '/etc/bacula/bacula-fd.conf',
archlinux => '/etc/bacula/bacula-wes-ich-net.conf'
},
ensure => file,
mode => 660,
owner => root,
group => root,
source => 'puppet:///modules/bacula-fd/bacula-fd.conf',
require => Package['bacula-fd']
}
user {bacula:
ensure => present,
home => '/var/lib/bacula',
shell => '/bin/false',
require => Package['bacula-fd']
}
group {bacula:
ensure => present,
require => Package['bacula-fd']
}
}
apply
- puppet apply /etc/puppet/manifests/site.pp
Notice: Compiled catalog for puppet.xinux.org in environment production in 0.18 seconds Notice: Finished catalog run in 0.19 seconds