-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0e9cd4
commit 77c4809
Showing
102 changed files
with
1,549 additions
and
4,367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
fixtures: | ||
repositories: | ||
concat: https://github.com/puppetlabs/puppetlabs-concat.git | ||
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git | ||
apt: https://github.com/puppetlabs/puppetlabs-apt.git | ||
yumrepo_core: | ||
repo: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git | ||
puppet_version: ">= 6.0.0" | ||
forge_modules: | ||
apt: 'puppetlabs-apt' | ||
stdlib: 'puppetlabs-stdlib' | ||
yumrepo_core: 'puppetlabs-yumrepo_core' | ||
symlinks: | ||
bareos: "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,16 @@ | ||
# == Class: bareos::client | ||
# This class manages the bareos client (file-daemon) service, packages and configuration directory. | ||
# Parameters should be configured in the upper class `::bareos`. | ||
|
||
# This class will be automatically included when a resource is defined. | ||
# It is not intended to be used directly by external resources like node definitions or other modules. | ||
# @summary | ||
# | ||
# @api private | ||
# | ||
class bareos::client ( | ||
$manage_service = $bareos::manage_service, | ||
$manage_package = $bareos::manage_package, | ||
$package_name = $bareos::client_package_name, | ||
$package_ensure = $bareos::package_ensure, | ||
$service_name = $bareos::client_service_name, | ||
$service_ensure = $bareos::service_ensure, | ||
$service_enable = $bareos::service_enable, | ||
$config_dir = "${bareos::config_dir}/bareos-fd.d" | ||
) inherits bareos { | ||
include bareos::client::client | ||
|
||
if $manage_package { | ||
package { $package_name: | ||
ensure => $package_ensure, | ||
tag => ['bareos', 'bareos_client'], | ||
} | ||
} | ||
|
||
if $manage_service { | ||
service { $service_name: | ||
ensure => $service_ensure, | ||
enable => $service_enable, | ||
tag => ['bareos', 'bareos_client'], | ||
} | ||
} | ||
) { | ||
assert_private() | ||
|
||
# directories | ||
$config_client_dirs = [ | ||
$config_dir, | ||
"${config_dir}/client", | ||
"${config_dir}/director", | ||
"${config_dir}/messages", | ||
] | ||
contain bareos::client::config | ||
contain bareos::client::package | ||
contain bareos::client::service | ||
|
||
file { $config_client_dirs: | ||
ensure => directory, | ||
purge => true, | ||
recurse => true, | ||
force => true, | ||
mode => $bareos::file_dir_mode, | ||
owner => $bareos::file_owner, | ||
group => $bareos::file_group, | ||
require => Package[$package_name], | ||
notify => Service[$service_name], | ||
tag => ['bareos', 'bareos_client'], | ||
} | ||
Class['bareos::client::package'] -> Class['bareos::client::config'] | ||
Class['bareos::client::config'] ~> Class['bareos::client::service'] | ||
Class['bareos::client::package'] ~> Class['bareos::client::service'] | ||
} |
Oops, something went wrong.