diff --git a/Gemfile.lock b/Gemfile.lock index c1b46dd66f553799d1c932c8f240aa67b50619fb..8cc704d4648ad47077916137c91d5059d7342e25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,22 +2,22 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (2.3.6) - addressable (2.8.1) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) ansi (1.5.0) ast (2.4.2) awesome_print (1.9.2) aws-eventstream (1.2.0) - aws-partitions (1.709.0) - aws-sdk-core (3.170.0) + aws-partitions (1.820.0) + aws-sdk-core (3.181.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-ec2 (1.364.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-ec2 (1.404.0) + aws-sdk-core (~> 3, >= 3.177.0) aws-sigv4 (~> 1.1) - aws-sigv4 (1.5.2) + aws-sigv4 (1.6.0) aws-eventstream (~> 1, >= 1.0.2) bcrypt_pbkdf (1.1.0) bindata (2.4.15) @@ -49,8 +49,8 @@ GEM simplecov (>= 0.15, < 0.22) coderay (1.1.3) colored2 (3.1.2) - concurrent-ruby (1.1.10) - connection_pool (2.3.0) + concurrent-ruby (1.2.2) + connection_pool (2.4.1) cri (2.15.11) deep_merge (1.2.2) dependency_checker (0.3.0) @@ -67,9 +67,10 @@ GEM unf (>= 0.0.5, < 1.0.0) ed25519 (1.3.0) erubi (1.12.0) - excon (0.99.0) - facter (4.3.0) + excon (0.102.0) + facter (4.4.3) hocon (~> 1.3) + sys-filesystem (~> 1.3) thor (>= 1.0.1, < 2.0) facterdb (1.21.0) facter (< 5.0.0) @@ -99,16 +100,17 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fast_gettext (2.2.0) + fast_gettext (2.3.0) ffi (1.15.5) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake forwardable (1.3.3) - gettext (3.4.3) + gettext (3.4.7) erubi locale (>= 2.0.5) prime + racc text (>= 1.3.0) gettext-setup (1.1.0) fast_gettext (~> 2.1) @@ -120,13 +122,13 @@ GEM builder (>= 2.1.2) rexml (~> 3.0) hiera (3.12.0) - hiera-eyaml (3.3.0) + hiera-eyaml (3.4.0) highline optimist highline (2.1.0) hirb (0.7.3) - hocon (1.3.1) - honeycomb-beeline (2.11.0) + hocon (1.4.0) + honeycomb-beeline (3.0.0) libhoney (>= 1.14.2) http (5.1.1) addressable (~> 2.8) @@ -141,9 +143,9 @@ GEM jgrep (1.5.4) jmespath (1.6.2) json (2.3.0) - json-schema (3.0.0) + json-schema (4.0.0) addressable (>= 2.8) - jwt (2.2.3) + jwt (2.7.1) libhoney (2.2.0) addressable (~> 2.0) excon @@ -158,20 +160,20 @@ GEM little-plugger (~> 1.1) multi_json (~> 1.14) metaclass (0.0.4) - metadata-json-lint (3.0.2) - json-schema (>= 2.8, < 4.0) + metadata-json-lint (3.0.3) + json-schema (>= 2.8, < 5.0) spdx-licenses (~> 1.0) method_source (1.0.0) - mime-types (3.4.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) + mime-types-data (3.2023.0808) minitar (0.9) mocha (1.1.0) metaclass (~> 0.0.1) molinillo (0.8.0) multi_json (1.15.0) multipart-post (2.3.0) - net-http-persistent (4.0.1) + net-http-persistent (4.0.2) connection_pool (~> 2.2) net-scp (1.2.1) net-ssh (>= 2.6.5) @@ -182,15 +184,16 @@ GEM net-telnet (0.1.1) netrc (0.11.0) nori (2.6.0) - optimist (3.0.1) - orchestrator_client (0.6.1) + optimist (3.1.0) + orchestrator_client (0.7.0) faraday (~> 1.4) net-http-persistent (~> 4.0) - parallel (1.22.1) + parallel (1.23.0) parallel_tests (3.13.0) parallel - parser (3.2.1.0) + parser (3.2.2.3) ast (~> 2.4.1) + racc pathspec (1.0.0) pluginator (1.5.0) prime (0.1.2) @@ -199,9 +202,9 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.1) - puppet (7.22.0) - concurrent-ruby (~> 1.0, < 1.2.0) + public_suffix (5.0.3) + puppet (7.25.0) + concurrent-ruby (~> 1.0) deep_merge (~> 1.0) facter (> 2.0.1, < 5) fast_gettext (>= 1.1, < 3) @@ -232,12 +235,12 @@ GEM puppet-lint (>= 1.0, < 3.0) puppet-lint-file_ensure-check (1.1.0) puppet-lint (>= 1.0, < 4) - puppet-lint-leading_zero-check (1.0.0) - puppet-lint (>= 1.0, < 3.0) + puppet-lint-leading_zero-check (1.1.0) + puppet-lint (>= 1.0, < 4.0) puppet-lint-legacy_facts-check (1.0.4) puppet-lint (~> 2.4) - puppet-lint-lookup_in_parameter-check (1.0.0) - puppet-lint (~> 2.0) + puppet-lint-lookup_in_parameter-check (1.1.0) + puppet-lint (>= 2.0, < 4) puppet-lint-manifest_whitespace-check (0.2.9) puppet-lint (>= 1.0, < 4) puppet-lint-optional_default-check (1.1.0) @@ -246,22 +249,22 @@ GEM puppet-lint (>= 1.1, < 4.0) puppet-lint-param-types (0.0.1) puppet-lint (>= 1.1, < 3.0) - puppet-lint-params_empty_string-check (1.0.0) - puppet-lint (~> 2.5) + puppet-lint-params_empty_string-check (1.1.0) + puppet-lint (>= 2.5, < 4) puppet-lint-resource_reference_syntax (1.2.0) puppet-lint (>= 1.0, < 4) puppet-lint-strict_indent-check (2.1.0) puppet-lint (>= 1.0, < 4) puppet-lint-top_scope_facts-check (1.0.1) puppet-lint (~> 2.0) - puppet-lint-topscope-variable-check (1.1.0) - puppet-lint (~> 2.0) + puppet-lint-topscope-variable-check (1.2.0) + puppet-lint (>= 2.0, < 4) puppet-lint-trailing_comma-check (1.0.0) puppet-lint (>= 1.0, < 4) puppet-lint-unquoted_string-check (2.2.0) puppet-lint (>= 2.1, < 4) - puppet-lint-variable_contains_upcase (1.3.0) - puppet-lint (>= 1.0, < 4) + puppet-lint-variable_contains_upcase (1.4.0) + puppet-lint (>= 1.0, < 5) puppet-lint-version_comparison-check (1.1.0) puppet-lint (>= 1.0, < 4) puppet-module-posix-default-r2.7 (1.1.1) @@ -299,7 +302,7 @@ GEM puppet-modulebuilder (0.3.0) minitar (~> 0.9) pathspec (>= 0.2.1, < 2.0.0) - puppet-resource_api (1.8.14) + puppet-resource_api (1.9.0) hocon (>= 1.0) puppet-strings (2.9.0) rgen @@ -312,7 +315,7 @@ GEM faraday_middleware (~> 1.0) minitar semantic_puppet (~> 1.0) - puppet_litmus (0.34.4) + puppet_litmus (0.36.2) bolt (~> 3.0) docker-api (>= 1.34, < 3.0.0) honeycomb-beeline @@ -331,43 +334,44 @@ GEM puppet-lint (~> 2.0) puppet-syntax (>= 2.0, < 4) rspec-puppet (~> 2.0) - r10k (3.15.4) + r10k (3.16.0) colored2 (= 3.1.2) cri (>= 2.15.10) fast_gettext (>= 1.1.0, < 3.0.0) gettext (>= 3.0.2, < 4.0.0) gettext-setup (>= 0.24, < 2.0.0) - jwt (~> 2.2.3) + jwt (>= 2.2.3, < 2.8.0) log4r (= 1.1.10) minitar (~> 0.9) multi_json (~> 1.10) puppet_forge (>= 2.3.0, < 4.0.0) + racc (1.7.1) rainbow (2.2.2) rake rake (13.0.6) rb-readline (0.5.5) - regexp_parser (2.7.0) + regexp_parser (2.8.1) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retryable (3.0.5) - rexml (3.2.5) + rexml (3.2.6) rgen (0.9.1) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) rspec-mocks (~> 3.12.0) - rspec-core (3.12.1) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.3) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-puppet (2.12.0) @@ -376,7 +380,7 @@ GEM facter facterdb (>= 0.5.0) puppet - rspec-support (3.12.0) + rspec-support (3.12.1) rspec_honeycomb_formatter (0.2.1) honeycomb-beeline rspec-core (~> 3.0) @@ -391,15 +395,15 @@ GEM rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.24.1) - parser (>= 3.1.1.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) rubocop-performance (1.9.1) rubocop (>= 0.90.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rspec (2.0.1) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) ruby_smb (1.1.0) bindata @@ -408,8 +412,8 @@ GEM rubyntlm (0.6.3) rubyzip (2.3.2) scanf (1.0.0) - semantic_puppet (1.0.4) - serverspec (2.42.1) + semantic_puppet (1.1.0) + serverspec (2.42.3) multi_json rspec (~> 3.0) rspec-its @@ -435,11 +439,13 @@ GEM unicode-display_width (>= 1.5, < 3.0) unicode_utils (~> 1.4) strings-ansi (0.2.0) + sys-filesystem (1.4.3) + ffi (~> 1.1) table_print (1.5.7) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) text (1.3.1) - thor (1.2.1) + thor (1.2.2) tty-cursor (0.7.1) tty-pager (0.14.0) strings (~> 0.2.0) @@ -474,7 +480,6 @@ GEM puppet-lint-unquoted_string-check (~> 2.2) puppet-lint-variable_contains_upcase (~> 1.2) puppet-lint-version_comparison-check (~> 1.1) - webrick (1.7.0) windows_error (0.1.5) winrm (2.3.6) builder (>= 2.1.2) @@ -490,15 +495,14 @@ GEM logging (>= 1.6.1, < 3.0) rubyzip (~> 2.0) winrm (~> 2.0) - yard (0.9.28) - webrick (~> 1.7.0) + yard (0.9.34) PLATFORMS ruby DEPENDENCIES json (= 2.3.0) - puppet (= 7.22.0) + puppet (= 7.25.0) puppet-module-posix-default-r2.7 (~> 1.0) puppet-module-posix-dev-r2.7 (~> 1.0) puppet-module-posix-system-r2.7 (~> 1.0) @@ -508,4 +512,4 @@ DEPENDENCIES voxpupuli-puppet-lint-plugins (>= 3.0) BUNDLED WITH - 2.1.4 + 2.4.13 diff --git a/manifests/appservice/irc.pp b/manifests/appservice/irc.pp index 9c292e36da277aab7cd0a189972a75bc95ffefcd..322bf68c1ae1ddc24aa180cacdfbff6dad5375c6 100644 --- a/manifests/appservice/irc.pp +++ b/manifests/appservice/irc.pp @@ -12,7 +12,7 @@ define matrix::appservice::irc ( Boolean $allow_expired_certs = false, Boolean $send_connection_messages = true, Hash $quit_debounce = {}, - Struct[{'o' => Integer, 'v' => Integer}] $move_power_map = { + Struct[{ 'o' => Integer, 'v' => Integer }] $move_power_map = { 'o' => 50, 'v' => 1, }, Hash $bot_config = { @@ -49,7 +49,6 @@ define matrix::appservice::irc ( 'userQuit' => true, }, - ) { include matrix::appservice::irc::setup $service_file = "/etc/systemd/system/${service_name}" @@ -65,7 +64,7 @@ define matrix::appservice::irc ( String => { 'debugApi' => { 'enabled' => false, 'port' => $irc_bridge_debug_port, - }}, + } }, } $libera_settings = { @@ -96,7 +95,7 @@ define matrix::appservice::irc ( $domain => $libera_settings, } - $data = hash2yaml($hash, {'indentation' => 2}) + $data = hash2yaml($hash, { 'indentation' => 2 }) .split("\n") .map |$line| { " ${line}" } .join("\n") diff --git a/manifests/appservice/irc/setup.pp b/manifests/appservice/irc/setup.pp index 596393c065dba2fbaf89716bcd3ad846ae1ed500..ceba8a0d2887b9db79ac8da3c222dd6d03df6368 100644 --- a/manifests/appservice/irc/setup.pp +++ b/manifests/appservice/irc/setup.pp @@ -8,7 +8,6 @@ class matrix::appservice::irc::setup ( Boolean $manage_db_user = true, Optional[Stdlib::Port] $db_port = undef, Variant[String, Sensitive[String]] $passkey, - String $config_file = '/etc/matrix-synapse/appservice-irc.yaml', String $service_name = 'matrix-appservice-irc.service', String $matrix_appservice_irc_path = '/home/lysroot/matrix-appservice-irc', String $registration_file = "${matrix_appservice_irc_path}/appservice-registration-irc.yaml", @@ -16,7 +15,6 @@ class matrix::appservice::irc::setup ( String $user_id = 'my_bot', Stdlib::Port $listen_port = 9999, ) { - # TODO fetch code postgresql::server::database { $db_name: @@ -58,8 +56,9 @@ class matrix::appservice::irc::setup ( ], } - concat::fragment { - content => epp("${module_name}/appservice_irc.yaml.epp") + concat::fragment { 'EPP': + target => $config_file, + content => epp("${module_name}/appservice_irc.yaml.epp"), } exec { 'Generate appservice file': @@ -113,5 +112,4 @@ class matrix::appservice::irc::setup ( Exec['systemctl daemon-reload'] ], } - } diff --git a/manifests/config.pp b/manifests/config.pp index 8beb4dbe6dffa9d537aae12bfa086ee1a7a9dae1..395c1e5b08555f0d52c972506c86d5aff19f95af 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,6 +1,5 @@ class matrix::config ( ) { - file { [ '/etc/matrix-synapse', '/etc/matrix-synapse/conf.d', @@ -83,12 +82,10 @@ class matrix::config ( }) } - { - 'trusted_key_servers' => [ - { + $config_dict = { + 'trusted_key_servers' => { 'server_name' => 'matrix.org', - }, - ], + }, 'supress_key_server_warning' => true, 'password_providers' => [ ], diff --git a/manifests/database/postgres.pp b/manifests/database/postgres.pp index 6b47576a2b9e3a74dc4caed478931e7d64a47e79..61669a6a02a584346a44c45ed450045147e75255 100644 --- a/manifests/database/postgres.pp +++ b/manifests/database/postgres.pp @@ -3,7 +3,6 @@ class matrix::database::postgres ( String $db_name, Sensitive[String] $db_pass, ) { - create_resources('Postgresql::Server::Role', $db_users, { update_password => true, @@ -11,10 +10,9 @@ class matrix::database::postgres ( }) postgresql::server::database { $db_name: - encoding => 'UTF-8' + encoding => 'UTF-8', locale => 'C', owner => $user, # before Class['synapse'] } - } diff --git a/manifests/init.pp b/manifests/init.pp index 98a1ad291cc6a8ae9a436bc97faa50fbd32569ab..3463ebf57c8f391bfa36432d2286a0e745f2bdf3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,10 +5,9 @@ class matrix ( String $package_name = 'matrix-synapse-py3', String $service_name = 'matrix-synapse', ) { - require apt apt::source { 'synapse': - locatino => 'https://packages.matrix.org/debian/', + location => 'https://packages.matrix.org/debian/', release => $facts['os']['distro']['codename'], repos => 'main', key => 'AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058', @@ -27,7 +26,6 @@ class matrix ( enable => true, } - include matrix::config include ::postgresql::server diff --git a/manifests/oidc/keycloak.pp b/manifests/oidc/keycloak.pp index 0fcd31cb659e1ae89479200e55a99be17dc068fe..870536f534de373f6a5cf35a57692535c245ace0 100644 --- a/manifests/oidc/keycloak.pp +++ b/manifests/oidc/keycloak.pp @@ -4,7 +4,14 @@ define matrix::oidc::keycloak ( String $client_id, Variant[String, Sensitive[String]] $client_secret, Boolean $backchannel_logout = true, - Struct[{'localpart_template' => String, 'display_name_template' => String}] $user_mapping = { + Struct[ + { + 'localpart_template' => String, + 'display_name_template' => String + } + ] + + $user_mapping = { 'localpart_template' => '{{user.preferred_username}}', 'display_name_template' => '{{user.name}}', }, diff --git a/manifests/revproxy.pp b/manifests/revproxy.pp index 84cd0489f592669cf7421634171c6c82adb344e8..d0bdd21501c9ee7a8a544a3047b2ea493d65badb 100644 --- a/manifests/revproxy.pp +++ b/manifests/revproxy.pp @@ -1,8 +1,7 @@ # https://matrix-org.github.io/synapse/latest/reverse_proxy.html?highlight=nginx#nginx class matrix::revproxy ( ) { - - include ::letsencrypt + include ::letsencrypt letsencrypt::cert { $matrix::servername: include_self => true, authenticator => 'nginx', @@ -26,10 +25,9 @@ class matrix::revproxy ( }) $well_known_server = to_json({ - 'm.server' => $matrix::servername, + 'm.server' => $matrix::servername, }) - nginx::resource::location { '~ ^(/_matrix|/_synapse/client)': server => $matrix::servername, index_files => [], @@ -65,5 +63,4 @@ class matrix::revproxy ( }, ; } - }