diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 168a5cb..08c6abf 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,4 +1,3 @@
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "VoxBox",
"image": "ghcr.io/voxpupuli/voxbox:latest"
diff --git a/.msync.yml b/.msync.yml
index 179bafc..7d6d4ee 100644
--- a/.msync.yml
+++ b/.msync.yml
@@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
-modulesync_config_version: '10.5.0'
+modulesync_config_version: '10.6.0'
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 0e5cfa7..64bda2b 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
-# `rubocop --auto-gen-config`
-# on 2023-08-17 21:36:53 UTC using RuboCop version 1.50.2.
+# `rubocop --auto-gen-config --no-auto-gen-timestamp`
+# using RuboCop version 1.85.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@@ -11,12 +11,17 @@
RSpec/MultipleMemoizedHelpers:
Max: 8
-# Offense count: 3
+# Offense count: 1
+RSpec/SpecFilePathSuffix:
+ Exclude:
+ - 'spec/defines/user.rb'
+
+# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Exclude:
- - 'spec/classes/prosody_spec.rb'
+ - '**/*.arb'
- 'spec/defines/user.rb'
- 'spec/defines/virtualhost_spec.rb'
diff --git a/Gemfile b/Gemfile
index 5f69bec..e0c8581 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
group :test do
- gem 'voxpupuli-test', '~> 13.0', :require => false
+ gem 'voxpupuli-test', '~> 14.0', :require => false
gem 'puppet_metadata', '~> 6.0', :require => false
end
@@ -18,7 +18,7 @@ group :system_tests do
end
group :release do
- gem 'voxpupuli-release', '~> 5.0', :require => false
+ gem 'voxpupuli-release', '~> 5.3', :require => false
end
gem 'rake', :require => false
diff --git a/REFERENCE.md b/REFERENCE.md
index c953b81..f774125 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -82,6 +82,8 @@ use libevent for keeping track of network connections
this parameter is deprecated, in favor of
network_backend (use options to set value)
+Default value: `true`
+
##### `daemonize`
Data type: `Optional[Boolean]`
@@ -89,216 +91,288 @@ Data type: `Optional[Boolean]`
if the server should be sent to background or not
deprecated since prosody version 0.12
+Default value: `true`
+
##### `admins`
Data type: `Array[String]`
+Default value: `[]`
+
##### `allow_registration`
Data type: `Boolean`
+Default value: `false`
+
##### `authentication`
Data type: `Enum['internal_plain', 'internal_hashed', 'cyrus', 'anonymous', 'ha1', 'ldap']`
+Default value: `'internal_plain'`
+
##### `c2s_require_encryption`
Data type: `Boolean`
+Default value: `true`
+
##### `community_modules`
Data type: `Array[String]`
+Default value: `[]`
+
##### `components`
Data type: `Hash`
+Default value: `{}`
+
##### `custom_options`
Data type: `Hash`
+Default value: `{}`
+
##### `error_log`
Data type: `Stdlib::Absolutepath`
+Default value: `'/var/log/prosody/prosody.err'`
+
##### `group`
Data type: `String`
+Default value: `'prosody'`
+
##### `info_log`
Data type: `Stdlib::Absolutepath`
+Default value: `'/var/log/prosody/prosody.log'`
+
##### `interfaces`
Data type: `Array[Stdlib::IP::Address]`
+Default value: `['0.0.0.0', '::']`
+
##### `log_level`
Data type: `Prosody::Loglevel`
+Default value: `'info'`
+
##### `log_sinks`
Data type: `Array[String]`
+Default value: `['syslog']`
+
##### `log_advanced`
Data type: `Hash[Optional[Prosody::Loglevel], Data]`
+Default value: `{}`
+
##### `modules`
Data type: `Array[String]`
+Default value: `[]`
+
##### `modules_base`
Data type: `Array[String]`
+Default value: `['admin_adhoc', 'dialback', 'disco', 'pep', 'ping', 'posix', 'private', 'roster', 'saslauth', 'time', 'tls', 'uptime', 'vcard', 'version']`
+
##### `modules_disabled`
Data type: `Array[String]`
+Default value: `[]`
+
##### `package_ensure`
Data type: `String[1]`
+Default value: `'present'`
+
##### `package_name`
Data type: `String`
+Default value: `'prosody'`
+
##### `manage_repository`
Data type: `Boolean`
+Default value: `false`
+
##### `repo_key`
Data type: `String`
+Default value: `'puppet:///modules/prosody/prosody.gpg'`
+
##### `pidfile`
Data type: `Stdlib::Absolutepath`
+Default value: `'/var/run/prosody/prosody.pid'`
+
##### `s2s_insecure_domains`
Data type: `Array[Stdlib::Fqdn]`
+Default value: `[]`
+
##### `s2s_require_encryption`
Data type: `Boolean`
+Default value: `true`
+
##### `s2s_secure_auth`
Data type: `Boolean`
+Default value: `true`
+
##### `s2s_secure_domains`
Data type: `Array[Stdlib::Fqdn]`
+Default value: `[]`
+
##### `ssl_ciphers`
Data type: `String`
+Default value: `'DH+AES:ECDH+AES:+ECDH+SHA:AES:!PSK:!SRP:!DSS:!ADH:!AECDH'`
+
##### `ssl_curve`
Data type: `String`
+Default value: `'secp521r1'`
+
##### `ssl_custom_config`
Data type: `Boolean`
+Default value: `true`
+
##### `ssl_dhparam`
Data type: `String`
+Default value: `undef`
+
##### `ssl_options`
Data type: `Array[String]`
+Default value: `['cipher_server_preference', 'no_compression', 'no_sslv2', 'no_sslv3', 'no_ticket', 'single_dh_use', 'single_ecdh_use']`
+
##### `storage`
Data type: `Variant[Hash, Enum['internal', 'sql', 'memory', 'null', 'none']]`
+Default value: `'internal'`
+
##### `user`
Data type: `String`
+Default value: `'prosody'`
+
##### `virtualhost_defaults`
Data type: `Hash`
+Default value: `{}`
+
##### `virtualhosts`
Data type: `Hash`
+Default value: `{}`
+
##### `disco_items`
Data type: `Array[String[1]]`
@@ -367,24 +441,32 @@ Data type: `Enum[present, latest]`
+Default value: `'present'`
+
##### `path`
Data type: `Stdlib::Absolutepath`
+Default value: `'/var/lib/prosody/modules'`
+
##### `source`
Data type: `String`
+Default value: `'https://hg.prosody.im/prosody-modules/'`
+
##### `type`
Data type: `Enum['hg', 'git']`
+Default value: `'hg'`
+
##### `revision`
Data type: `Optional[String]`
diff --git a/spec/classes/prosody_spec.rb b/spec/classes/prosody_spec.rb
index e348c06..5d3e8f9 100644
--- a/spec/classes/prosody_spec.rb
+++ b/spec/classes/prosody_spec.rb
@@ -23,7 +23,7 @@
it {
is_expected.to contain_service('prosody').with(
- ensure: 'running'
+ ensure: 'running',
)
}
end
@@ -33,7 +33,7 @@
it {
is_expected.not_to contain_service('prosody').with(
- ensure: 'running'
+ ensure: 'running',
)
}
end
@@ -42,10 +42,10 @@
let(:params) { { custom_options: { 'foo' => 'bar', 'baz' => 'quux', 'int' => 42 } } }
it {
- is_expected.to contain_file('/etc/prosody/prosody.cfg.lua'). \
- with_content(%r{^foo = "bar"$}, %r{^baz = "quux"$}). \
- with_content(%r{^int = 42$}). \
- with_notify('Class[Prosody::Service]')
+ is_expected.to contain_file('/etc/prosody/prosody.cfg.lua')
+ .with_content(%r{^foo = "bar"$}, %r{^baz = "quux"$})
+ .with_content(%r{^int = 42$})
+ .with_notify('Class[Prosody::Service]')
}
end
@@ -53,10 +53,10 @@
let(:params) { { custom_options: { 'foo' => { 'fnord' => '23', 'xyzzy' => '42' }, 'bar' => %w[cool elements], 'baz' => 'quux' } } }
it {
- is_expected.to contain_file('/etc/prosody/prosody.cfg.lua'). \
- with_content(%r{^foo = {\n fnord = "23";\n xyzzy = "42";\n}$}). \
- with_content(%r{^baz = "quux"$}). \
- with_content(%r{^bar = { "cool", "elements" }$})
+ is_expected.to contain_file('/etc/prosody/prosody.cfg.lua')
+ .with_content(%r{^foo = {\n fnord = "23";\n xyzzy = "42";\n}$})
+ .with_content(%r{^baz = "quux"$})
+ .with_content(%r{^bar = { "cool", "elements" }$})
}
end
@@ -64,11 +64,11 @@
let(:params) { { components: { 'conference.test.ch' => { 'type' => 'muc', 'options' => { 'int' => 42, 'str' => 'twentyfour', 'arr' => %w[two four] } } } } }
it {
- is_expected.to contain_file('/etc/prosody/prosody.cfg.lua'). \
- with_content(%r{^Component "conference.test.ch" "muc"}). \
- with_content(%r{^ arr = { "two", "four" };}). \
- with_content(%r{^ int = 42;}). \
- with_content(%r{^ str = "twentyfour";})
+ is_expected.to contain_file('/etc/prosody/prosody.cfg.lua')
+ .with_content(%r{^Component "conference.test.ch" "muc"})
+ .with_content(%r{^ arr = { "two", "four" };})
+ .with_content(%r{^ int = 42;})
+ .with_content(%r{^ str = "twentyfour";})
}
end
@@ -78,9 +78,9 @@
it { is_expected.to compile.with_all_deps }
it {
- is_expected.to contain_file('/etc/prosody/prosody.cfg.lua'). \
- with_content(%r{"[^"]+/mod_coolmod";}). \
- with_content(%r{"[^"]+/mod_othermod";})
+ is_expected.to contain_file('/etc/prosody/prosody.cfg.lua')
+ .with_content(%r{"[^"]+/mod_coolmod";})
+ .with_content(%r{"[^"]+/mod_othermod";})
}
end
end
diff --git a/spec/classes/service_spec.rb b/spec/classes/service_spec.rb
index bd3ea40..f27495c 100644
--- a/spec/classes/service_spec.rb
+++ b/spec/classes/service_spec.rb
@@ -11,24 +11,24 @@
if facts[:os]['name'] == 'Debian'
is_expected.not_to contain_service('prosody')
else
- is_expected.to contain_service('prosody').
- with_ensure('running').
- with_enable(true).
- without_hasstatus.
- without_restart
+ is_expected.to contain_service('prosody')
+ .with_ensure('running')
+ .with_enable(true)
+ .without_hasstatus
+ .without_restart
end
elsif facts[:os]['family'] == 'OpenBSD'
- is_expected.not_to contain_service('prosody').
- with_ensure('running').
- with_enable(true).
- without_hasstatus.
- without_restart
+ is_expected.not_to contain_service('prosody')
+ .with_ensure('running')
+ .with_enable(true)
+ .without_hasstatus
+ .without_restart
else
- is_expected.to contain_service('prosody').
- with_ensure('running').
- with_hasstatus(false).
- with_restart('/usr/bin/prosodyctl reload')
+ is_expected.to contain_service('prosody')
+ .with_ensure('running')
+ .with_hasstatus(false)
+ .with_restart('/usr/bin/prosodyctl reload')
end
}
end
@@ -53,9 +53,9 @@
end
it {
- is_expected.to contain_service('prosody').
- with_ensure('running').
- with_enable(true)
+ is_expected.to contain_service('prosody')
+ .with_ensure('running')
+ .with_enable(true)
}
end
diff --git a/spec/defines/user.rb b/spec/defines/user.rb
index c76e9fd..beaf90e 100644
--- a/spec/defines/user.rb
+++ b/spec/defines/user.rb
@@ -23,7 +23,7 @@
};',
ensure: 'present',
recurse: false,
- purge: false
+ purge: false,
)
}
end
@@ -37,7 +37,7 @@
return {
[\"password\"] = \"pass123\";
};',
- ensure: 'present'
+ ensure: 'present',
)
}
end
@@ -51,7 +51,7 @@
return {
[\"password\"] = \"pass123\";
};',
- ensure: 'present'
+ ensure: 'present',
)
}
end
@@ -61,7 +61,7 @@
it {
is_expected.to contain_file('/var/lib/prosodoy/foo%2dbar%2ecom/accounts/bob.dat').with(
- ensure: 'present'
+ ensure: 'present',
)
}
@@ -69,7 +69,7 @@
is_expected.to contain_file('/var/lib/prosodoy/foo%2dbar%2ecom/accounts').with(
ensure: 'present',
purge: true,
- recurse: true
+ recurse: true,
)
}
end
diff --git a/spec/defines/virtualhost_spec.rb b/spec/defines/virtualhost_spec.rb
index 47a6f44..36435ef 100644
--- a/spec/defines/virtualhost_spec.rb
+++ b/spec/defines/virtualhost_spec.rb
@@ -20,7 +20,7 @@
context 'with no parameters' do
it {
is_expected.to contain_file(path_avail).with(
- ensure: 'present'
+ ensure: 'present',
)
}
@@ -28,7 +28,7 @@
is_expected.to contain_file(path_link).with(
ensure: 'link',
target: path_avail,
- require: "File[#{path_avail}]"
+ require: "File[#{path_avail}]",
)
}
end
@@ -58,7 +58,7 @@
# This require statment is bananas
is_expected.to contain_file(path_avail).with(
ensure: 'present',
- require: ['File[/etc/prosody/certs/mockvirtualhost.key]', 'File[/etc/prosody/certs/mockvirtualhost.crt]', 'Class[Prosody::Package]']
+ require: ['File[/etc/prosody/certs/mockvirtualhost.key]', 'File[/etc/prosody/certs/mockvirtualhost.crt]', 'Class[Prosody::Package]'],
)
is_expected.to contain_file('/etc/prosody/certs/mockvirtualhost.key').with_source(ssl_key)
@@ -74,7 +74,7 @@
it {
is_expected.to contain_file(path_avail).with(
ensure: 'present',
- require: ['Class[Prosody::Package]']
+ require: ['Class[Prosody::Package]'],
)
}
end
@@ -95,9 +95,9 @@
let(:params) { { custom_options: { 'foo' => 'bar', 'baz' => 'quux', 'int' => 42 } } }
it {
- is_expected.to contain_file(path_avail). \
- with_content(%r{^foo = "bar"$}, %r{^baz = "quux"$}). \
- with_content(%r{^int = 42$})
+ is_expected.to contain_file(path_avail)
+ .with_content(%r{^foo = "bar"$}, %r{^baz = "quux"$})
+ .with_content(%r{^int = 42$})
}
end
@@ -105,9 +105,9 @@
let(:params) { { custom_options: { 'foo' => { 'fnord' => '23', 'xyzzy' => '42' }, 'bar' => %w[cool elements], 'baz' => 'quux', 'int' => 42 } } }
it {
- is_expected.to contain_file(path_avail). \
- with_content(%r{^foo = {\n fnord = "23";\n xyzzy = "42";\n}$}, %r{^baz = "quux"$}, %r{^bar = [ "col;emnts]$}). \
- with_content(%r{^int = 42$})
+ is_expected.to contain_file(path_avail)
+ .with_content(%r{^foo = {\n fnord = "23";\n xyzzy = "42";\n}$}, %r{^baz = "quux"$}, %r{^bar = [ "col;emnts]$})
+ .with_content(%r{^int = 42$})
}
end
@@ -115,12 +115,12 @@
let(:params) { { components: { 'comp1' => { 'type' => 'muc', 'options' => { 'bo' => true, 'arr' => %w[one two], 'str' => 'string', 'int' => 42 } } } } }
it {
- is_expected.to contain_file(path_avail). \
- with_content(%r{^Component "comp1" "muc"$}). \
- with_content(%r{^ bo = true;$}). \
- with_content(%r{^ arr = { "one", "two" };$}). \
- with_content(%r{^ str = "string";$}). \
- with_content(%r{^ int = 42;$})
+ is_expected.to contain_file(path_avail)
+ .with_content(%r{^Component "comp1" "muc"$})
+ .with_content(%r{^ bo = true;$})
+ .with_content(%r{^ arr = { "one", "two" };$})
+ .with_content(%r{^ str = "string";$})
+ .with_content(%r{^ int = 42;$})
}
end
@@ -128,8 +128,8 @@
let(:params) { { disco_items: %w[foo bar] } }
it {
- is_expected.to contain_file(path_avail). \
- with_content(%r{^disco_items = \{\n \{ "foo" \};\n \{ "bar" \};\n\}})
+ is_expected.to contain_file(path_avail)
+ .with_content(%r{^disco_items = \{\n \{ "foo" \};\n \{ "bar" \};\n\}})
}
end
end