Skip to content

Commit

Permalink
Merge branch 'master' into FlorentPoinsaut-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentPoinsaut committed May 11, 2023
2 parents cbb7ca5 + 0ac4a44 commit c61a83d
Show file tree
Hide file tree
Showing 53 changed files with 2,911 additions and 1,906 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

```sh
export PUPPET_GEM_VERSION="~> 5.5.6"
export PUPPET_GEM_VERSION="~> 6.1.0"
```

You can install all needed gems for spec tests into the modules directory by
Expand Down
3 changes: 0 additions & 3 deletions .github/SECURITY.md

This file was deleted.

36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
/.yardoc/
/Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '5.2.0'
modulesync_config_version: '5.5.0'
64 changes: 32 additions & 32 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
/.yardoc/
/.yardopts
/Dockerfile
9 changes: 4 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

source ENV['GEM_SOURCE'] || "https://rubygems.org"
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 5.0', :require => false
gem 'voxpupuli-test', '~> 5.4', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 1.0', :require => false
gem 'puppet_metadata', '~> 2.0', :require => false
end

group :development do
Expand All @@ -21,8 +21,7 @@ end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'voxpupuli-release', '~> 2.0', :require => false
end

gem 'rake', :require => false
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ A good starting point is too look into the profile classes `bareos::profile::dir

Please note, this is only the minimal subset of an bareos configuration. You may use only some of the default configurations such like the schedules, messages, filesets or profiles.

It is highly recommend **not** to use sqlite3 as bareos catalog backend. Please ensure you provide an mysql or postgresql database. See also define `bareos::director::catalog` for the possible database configuration.
*Note that Bareos >= 21 only supports `postgresql` as a DB backend.*

```puppet
# Install and configure an Director Server
$storage_password = 'Password of the storage instance',
class { '::bareos::profile::director':
password => 'Password of the director instance itself',
catalog_conf => {
'db_driver' => 'mysql',
'db_name' => 'bareos_catalog',
'db_address' => 'fqdn',
'db_port' => 3306,
'db_address' => '127.0.0.1',
'db_port' => 5432,
'db_user' => 'user',
'db_password' => 'password'
},
Expand Down Expand Up @@ -403,7 +402,6 @@ bareos::director::director::name_director: 'example'
bareos::director::director::password: 'foobar'
bareos::director::catalogs:
'testing':
db_driver: 'postgresql'
db_name: 'test'
bareos::director::clients:
'alice':
Expand Down
4,489 changes: 2,747 additions & 1,742 deletions REFERENCE.md

Large diffs are not rendered by default.

36 changes: 4 additions & 32 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ end
begin
require 'voxpupuli/release/rake_tasks'
rescue LoadError
# voxpupuli-release not present
else
GCGConfig.user = 'voxpupuli'
GCGConfig.project = 'puppet-bareos'
end

desc "Run main 'test' task and report merged results to coveralls"
Expand All @@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do
end
end

desc 'Generate REFERENCE.md'
task :reference, [:debug, :backtrace] do |t, args|
patterns = ''
Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
end

begin
require 'github_changelog_generator/task'
require 'puppet_blacksmith'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
metadata = Blacksmith::Modulefile.new
config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
config.user = 'voxpupuli'
config.project = metadata.metadata['name']
end

# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
require 'rbconfig'
if RbConfig::CONFIG['host_os'] =~ /linux/
task :changelog do
puts 'Fixing line endings...'
changelog_file = File.join(__dir__, 'CHANGELOG.md')
changelog_txt = File.read(changelog_file)
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
File.open(changelog_file, "w") {|file| file.puts new_contents }
end
end

rescue LoadError
end
# vim: syntax=ruby
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/bareos_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module Puppet::Parser::Functions
when 'replace_option'
value_in_array = %w[always ifnewer ifolder never]
when 'device_type'
value_in_array = %w[tape file fifo gfapi rados]
value_in_array = %w[tape file fifo gfapi rados droplet]
when 'compression_algorithm'
value_in_array = %w[gzip lzo lzfast lz4 lz4hc]
else
Expand Down
2 changes: 1 addition & 1 deletion manifests/client/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
$_require_res_messages,
])

$_settings = bareos_settings( [$name_client, 'Name', 'name', true],
$_settings = bareos_settings([$name_client, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$absolute_job_timeout, 'Absolute Job Timeout', 'pint32', false],
[$allow_bandwidth_bursting, 'Allow Bandwidth Bursting', 'boolean', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/client/director.pp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$address, 'Address', 'string', false],
[$allowed_job_command, 'Allowed Job Command', 'string_list', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/client/messages.pp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$append, 'Append', 'messages_list', false],
[$catalog, 'Catalog', 'messages_list', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/console/console.pp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$director, 'Director', 'string', false],
[$heartbeat_interval, 'Heartbeat Interval', 'time', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/console/director.pp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$address, 'Address', 'string', false],
[$dir_port, 'Dir Port', 'pint32', false],
Expand Down
11 changes: 8 additions & 3 deletions manifests/director/catalog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
# Db Driver
#
# Bareos Datatype: string
# Bareos Default: Not set
# Required: true
# Bareos Default: postgresql
# Required: false
#
# This parameter is deprecated. The only valid value under bareos >= 21 is
# `postgresql`.
#
# See https://docs.bareos.org/Configuration/Director.html#config-Dir_Catalog_DbDriver
#
# [*db_name*]
# Db Name
Expand Down Expand Up @@ -156,7 +161,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$db_address, 'Db Address', 'string', false],
[$db_driver, 'Db Driver', 'string', true],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
$_require_res_catalog,
])

$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$address, 'Address', 'string', true],
[$auth_type, 'Auth Type', 'auth_type', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/console.pp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
$_require_res_profiles,
])

$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$catalog_acl, 'Catalog ACL', 'acl', false],
[$client_acl, 'Client ACL', 'acl', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/counter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
$_require_res_catalog,
])

$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$catalog, 'Catalog', 'res', false],
[$maximum, 'Maximum', 'pint32', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/director.pp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
$_require_res_messages,
])

$_settings = bareos_settings( [$name_director, 'Name', 'name', true],
$_settings = bareos_settings([$name_director, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$absolute_job_timeout, 'Absolute Job Timeout', 'pint32', false],
[$audit_events, 'Audit Events', 'audit_command_list', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/fileset.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$enable_vss, 'Enable VSS', 'boolean', false],
[$exclude, 'Exclude', 'include_exclude_item', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/job.pp
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@
$_require_res_storage,
])

$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$accurate, 'Accurate', 'boolean', false],
[$add_prefix, 'Add Prefix', 'string', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/jobdefs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@
$_require_res_storage,
])

$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$accurate, 'Accurate', 'boolean', false],
[$add_prefix, 'Add Prefix', 'string', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/messages.pp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
}

if $ensure == 'present' {
$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$append, 'Append', 'messages_list', false],
[$catalog, 'Catalog', 'messages_list', false],
Expand Down
2 changes: 1 addition & 1 deletion manifests/director/pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
$_require_res_storage,
])

$_settings = bareos_settings( [$name, 'Name', 'name', true],
$_settings = bareos_settings([$name, 'Name', 'name', true],
[$description, 'Description', 'string', false],
[$action_on_purge, 'Action On Purge', 'action_on_purge', false],
[$auto_prune, 'Auto Prune', 'boolean', false],
Expand Down
Loading

0 comments on commit c61a83d

Please sign in to comment.