diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 168a5cb4..08c6abf9 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 179bafc0..7d6d4ee4 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/Gemfile b/Gemfile index 0b6fdfda..a3590dfd 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 @@ -19,7 +19,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/spec/classes/postfix_spec.rb b/spec/classes/postfix_spec.rb index 8367ba00..26a65789 100644 --- a/spec/classes/postfix_spec.rb +++ b/spec/classes/postfix_spec.rb @@ -84,7 +84,7 @@ ensure: 'running', enable: 'true', hasstatus: 'true', - restart: '/etc/init.d/postfix reload' + restart: '/etc/init.d/postfix reload', ) } end @@ -103,7 +103,7 @@ it { is_expected.to contain_augeas("manage postfix 'mailq_path'") } it { is_expected.to contain_alternatives('mta') } - context 'when on release 8', if: (facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '8') do # rubocop:disable RSpec/MultipleMemoizedHelpers + context 'when on release 8', if: facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '8' do # rubocop:disable RSpec/MultipleMemoizedHelpers it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") } it { @@ -111,12 +111,12 @@ ensure: 'running', enable: 'true', hasstatus: 'true', - restart: '/bin/systemctl reload postfix' + restart: '/bin/systemctl reload postfix', ) } end - context 'when on release 7', if: (facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '7') do # rubocop:disable RSpec/MultipleMemoizedHelpers + context 'when on release 7', if: facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '7' do # rubocop:disable RSpec/MultipleMemoizedHelpers it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") } it { @@ -124,12 +124,12 @@ ensure: 'running', enable: 'true', hasstatus: 'true', - restart: '/bin/systemctl reload postfix' + restart: '/bin/systemctl reload postfix', ) } end - context 'when on release 6', if: (facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '6') do # rubocop:disable RSpec/MultipleMemoizedHelpers + context 'when on release 6', if: facts[:os]['family'] == 'RedHat' && facts[:operatingsystemmajrelease] == '6' do # rubocop:disable RSpec/MultipleMemoizedHelpers it { is_expected.to contain_file('/etc/aliases').with_seltype('etc_aliases_t').with_content("# file managed by puppet\n") } it { @@ -137,7 +137,7 @@ ensure: 'running', enable: 'true', hasstatus: 'true', - restart: '/etc/init.d/postfix reload' + restart: '/etc/init.d/postfix reload', ) } end @@ -151,7 +151,7 @@ ensure: 'running', enable: 'true', hasstatus: 'true', - restart: '/bin/systemctl reload postfix' + restart: '/bin/systemctl reload postfix', ) } end @@ -207,23 +207,23 @@ it { is_expected.to contain_file(postfix_master_cf_path).without('seltype').with_content( - %r{smtp inet n - - - - smtpd} + %r{smtp inet n - - - - smtpd}, ).with_content( - %r{amavis unix} + %r{amavis unix}, ).with_content( - %r{dovecot.*\n.* user=bar:bar } + %r{dovecot.*\n.* user=bar:bar }, ).with_content( - %r{schleuder} + %r{schleuder}, ).with_content( - %r{sympa} + %r{sympa}, ).with_content( - %r{user=bar} + %r{user=bar}, ).with_content( - %r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:} + %r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:}, ).with_content( - %r{^smtps inet n} + %r{^smtps inet n}, ).with_content( - %r{^submission inet n} + %r{^submission inet n}, ) } @@ -234,7 +234,7 @@ ensure: 'running', enable: 'true', hasstatus: 'true', - restart: '/etc/init.d/postfix reload' + restart: '/etc/init.d/postfix reload', ) } @@ -261,7 +261,7 @@ ldap: true, ldap_base: 'cn=Users,dc=example,dc=com', ldap_host: 'ldaps://ldap.example.com:636 ldap://ldap2.example.com', - ldap_options: 'start_tls = yes' + ldap_options: 'start_tls = yes', } end @@ -421,9 +421,9 @@ it 'updates master.cf with the specified flags to smtp' do is_expected.to contain_file(postfix_master_cf_path).with_content( - %r{smtp inet n - - - - smtpd} + %r{smtp inet n - - - - smtpd}, ).with_content( - %r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:} + %r{^smtp.*\n.*smtpd_client_restrictions=check_client_access,hash:}, ) end end @@ -473,8 +473,8 @@ { masquerade_classes: ['envelope_sender'], masquerade_domains: ['host.example.com', 'example.com'], - masquerade_exceptions: ['root'] - } + masquerade_exceptions: ['root'], + }, ) end @@ -510,7 +510,7 @@ { mta: true, mydestination: 'example.org, example.com, localhost.localdomain, localhost', - relayhost: '2.3.4.5' + relayhost: '2.3.4.5', } end @@ -526,7 +526,7 @@ mta: true, mydestination: '1.2.3.4', relayhost: 'direct', - mynetworks: '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24' + mynetworks: '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24', } end @@ -548,7 +548,7 @@ let(:params) do { mta: true, - relayhost: 'relay.example.org' + relayhost: 'relay.example.org', } end @@ -612,7 +612,7 @@ it 'updates master.cf to listen to all addresses' do is_expected.to contain_file(postfix_master_cf_path).with_content( - %r{smtp inet n - n - - smtpd} + %r{smtp inet n - n - - smtpd}, ) end end @@ -622,9 +622,9 @@ it 'updates master.cf with multiple smtp listeners' do is_expected.to contain_file(postfix_master_cf_path).with_content( - %r{192.168.0.123:smtp inet n - n - - smtpd} + %r{192.168.0.123:smtp inet n - n - - smtpd}, ).with_content( - %r{10.0.0.123:smtp inet n - n - - smtpd} + %r{10.0.0.123:smtp inet n - n - - smtpd}, ) end end @@ -634,9 +634,9 @@ it 'updates master.cf with multiple smtp listeners' do is_expected.to contain_file(postfix_master_cf_path).with_content( - %r{192.168.0.123:smtp inet n - n - - smtpd} + %r{192.168.0.123:smtp inet n - n - - smtpd}, ).with_content( - %r{10.0.0.123:smtp inet n - n - - smtpd} + %r{10.0.0.123:smtp inet n - n - - smtpd}, ) end end @@ -812,7 +812,7 @@ 'search_base' => 'dc=example, dc=com', 'query_filter' => 'mail=%s', 'result_attribute' => 'uid', - } + }, ) is_expected.to contain_file('postfix conffile ldapoptions.cf').with_ensure('present') end @@ -833,7 +833,7 @@ it 'creates the map resource' do is_expected.to contain_postfix__map('a_map').with( 'type' => 'regexp', - 'content' => 'abc xyz' + 'content' => 'abc xyz', ) is_expected.to contain_exec('generate a_map.db') is_expected.to contain_file('postfix map a_map') diff --git a/spec/defines/postfix_conffile_spec.rb b/spec/defines/postfix_conffile_spec.rb index 488287cd..b42b1c2d 100644 --- a/spec/defines/postfix_conffile_spec.rb +++ b/spec/defines/postfix_conffile_spec.rb @@ -54,7 +54,7 @@ it { is_expected.to contain_file('postfix conffile foo').with( ensure: 'present', - source: 'puppet:///modules/postfix/bar' + source: 'puppet:///modules/postfix/bar', ).without(:content) } end @@ -69,7 +69,7 @@ it { is_expected.to contain_file('postfix conffile foo').with( ensure: 'present', - content: 'bar' + content: 'bar', ).without(:source) } end @@ -126,7 +126,7 @@ it { is_expected.to contain_file('postfix conffile foo').with( mode: '0644', - content: 'bar' + content: 'bar', ) } end @@ -142,7 +142,7 @@ it { is_expected.to contain_file('postfix conffile foo').with( path: '/tmp/foo', - content: 'bar' + content: 'bar', ) } end diff --git a/spec/defines/postfix_config_spec.rb b/spec/defines/postfix_config_spec.rb index 09ac879d..96c09f86 100644 --- a/spec/defines/postfix_config_spec.rb +++ b/spec/defines/postfix_config_spec.rb @@ -56,7 +56,7 @@ is_expected.to contain_augeas("manage postfix 'foo'").with( incl: postfix_main_cf_path, lens: 'Postfix_Main.lns', - changes: "set foo 'bar'" + changes: "set foo 'bar'", ) } end @@ -73,7 +73,7 @@ is_expected.to contain_augeas("manage postfix 'foo'").with( incl: postfix_main_cf_path, lens: 'Postfix_Main.lns', - changes: 'rm foo' + changes: 'rm foo', ) } end @@ -90,7 +90,7 @@ is_expected.to contain_augeas("manage postfix 'foo'").with( incl: postfix_main_cf_path, lens: 'Postfix_Main.lns', - changes: 'clear foo' + changes: 'clear foo', ) } end diff --git a/spec/defines/postfix_hash_spec.rb b/spec/defines/postfix_hash_spec.rb index 491e4f98..7f4c08c4 100644 --- a/spec/defines/postfix_hash_spec.rb +++ b/spec/defines/postfix_hash_spec.rb @@ -64,7 +64,7 @@ it { is_expected.to contain_file('postfix map /tmp/foo').with( ensure: 'present', - source: '/tmp/bar' + source: '/tmp/bar', ).without(:content) } @@ -90,7 +90,7 @@ it { is_expected.to contain_file('postfix map /tmp/foo').with( ensure: 'present', - content: 'bar' + content: 'bar', ).without(:source) } @@ -107,7 +107,7 @@ context 'when not passing source or content' do it { is_expected.to contain_file('postfix map /tmp/foo').with( - ensure: 'present' + ensure: 'present', ).without(:source).without(:content) } diff --git a/spec/defines/postfix_map_spec.rb b/spec/defines/postfix_map_spec.rb index 22da02df..49ec1dec 100644 --- a/spec/defines/postfix_map_spec.rb +++ b/spec/defines/postfix_map_spec.rb @@ -61,7 +61,7 @@ it { is_expected.to contain_file('postfix map foo').with( ensure: 'present', - source: '/tmp/bar' + source: '/tmp/bar', ).without(:content) } @@ -79,7 +79,7 @@ it { is_expected.to contain_file('postfix map foo').with( ensure: 'present', - content: 'bar' + content: 'bar', ).without(:source) } @@ -90,7 +90,7 @@ context 'when not passing source or content' do it { is_expected.to contain_file('postfix map foo').with( - ensure: 'present' + ensure: 'present', ).without(:source).without(:content) } diff --git a/spec/defines/postfix_transport_spec.rb b/spec/defines/postfix_transport_spec.rb index 02face2a..24dda8a5 100644 --- a/spec/defines/postfix_transport_spec.rb +++ b/spec/defines/postfix_transport_spec.rb @@ -67,7 +67,7 @@ class { 'postfix': } "clear pattern[. = 'foo']/nexthop", "rm pattern[. = 'foo']/host", "rm pattern[. = 'foo']/port", - ] + ], ) } end @@ -92,7 +92,7 @@ class { 'postfix': } "rm pattern[. = 'foo']/host", "rm pattern[. = 'foo']/port", "set pattern[. = 'foo']/nexthop 'baz'", - ] + ], ) } end @@ -116,7 +116,7 @@ class { 'postfix': } "rm pattern[. = 'foo']/host", "rm pattern[. = 'foo']/port", "set pattern[. = 'foo']/nexthop '[baz]'", - ] + ], ) } end @@ -140,7 +140,7 @@ class { 'postfix': } "rm pattern[. = 'foo']/host", "rm pattern[. = 'foo']/port", "set pattern[. = 'foo']/nexthop ':[baz]'", - ] + ], ) } end @@ -165,7 +165,7 @@ class { 'postfix': } "rm pattern[. = 'foo']/nexthop", "set pattern[. = 'foo']/host '[baz]'", "set pattern[. = 'foo']/port '1234'", - ] + ], ) } end @@ -190,7 +190,7 @@ class { 'postfix': } "rm pattern[. = 'foo']/nexthop", "set pattern[. = 'foo']/host ':[baz]'", "set pattern[. = 'foo']/port '1234'", - ] + ], ) } end @@ -209,7 +209,7 @@ class { 'postfix': } lens: 'Postfix_Transport.lns', changes: [ "rm pattern[. = 'foo']", - ] + ], ) } end diff --git a/spec/defines/postfix_virtual_spec.rb b/spec/defines/postfix_virtual_spec.rb index 7d13cb0d..1ce88616 100644 --- a/spec/defines/postfix_virtual_spec.rb +++ b/spec/defines/postfix_virtual_spec.rb @@ -79,7 +79,7 @@ class { 'postfix': } "defnode entry pattern[. = 'foo'] 'foo'", 'rm $entry/destination', "set $entry/destination[1] 'bar'", - ] + ], ) } end @@ -101,7 +101,7 @@ class { 'postfix': } "defnode entry pattern[. = 'foo'] 'foo'", 'rm $entry/destination', "set $entry/destination[1] 'bar'", - ] + ], ) } end @@ -124,7 +124,7 @@ class { 'postfix': } 'rm $entry/destination', "set $entry/destination[1] 'bar'", "set $entry/destination[2] 'baz'", - ] + ], ) } end @@ -143,7 +143,7 @@ class { 'postfix': } lens: 'Postfix_Virtual.lns', changes: [ "rm pattern[. = 'foo']", - ] + ], ) } end