From 4b7c3332b0518a0eea757bf47a8755794d01c5d8 Mon Sep 17 00:00:00 2001 From: Alessandro Franceschi Date: Thu, 19 Oct 2023 23:48:13 +0200 Subject: [PATCH] v 3.10.1 * pdk test unit opn Puppet 8, 7 and 6 * Test pdk container for github actions * Fixed Unknown variable: 'real_base_url' * Lints * Lints and undef fixes * Lints. Remove unit tests on Puppet 6 * Adapt tp data for spec tests * Disable param documentation check in puppet lint * Disable param documentation check in puppet lint * Lints and fixes * Fixing tests * unit tests --- .github/workflows/pr.yml | 16 +++-- .puppet-lint.rc | 1 + CHANGELOG.md | 7 +++ Gemfile | 10 ++-- README-legacy.md | 2 +- README.md | 2 +- manifests/cli.pp | 2 +- manifests/conf.pp | 26 ++++----- manifests/create_dir.pp | 58 +++++++++++-------- manifests/dir.pp | 40 ++++++------- manifests/init.pp | 6 +- manifests/install.pp | 32 +++++----- manifests/install/package.pp | 4 +- manifests/repo.pp | 2 +- manifests/setup.pp | 2 +- manifests/stdmod.pp | 4 +- metadata.json | 2 +- spec/defines/stdmod_spec.rb | 4 +- spec/functions/tp_lookup_spec.rb | 8 +-- spec/tpdata/centos-7-x86_64/elasticsearch | 2 +- spec/tpdata/centos-7-x86_64/gitlab-runner | 2 +- spec/tpdata/centos-7-x86_64/icinga2 | 2 +- spec/tpdata/centos-7-x86_64/openssh | 2 +- spec/tpdata/centos-7-x86_64/postfix | 2 +- spec/tpdata/centos-7-x86_64/puppet | 2 +- spec/tpdata/centos-7-x86_64/puppet-agent | 2 +- spec/tpdata/centos-7-x86_64/rsyslog | 2 +- spec/tpdata/centos-7-x86_64/sysdig | 2 +- spec/tpdata/redhat-8-x86_64/elasticsearch | 2 +- spec/tpdata/redhat-8-x86_64/icinga2 | 2 +- spec/tpdata/redhat-8-x86_64/openssh | 2 +- spec/tpdata/redhat-8-x86_64/rsyslog | 2 +- spec/tpdata/redhat-8-x86_64/sysdig | 2 +- spec/tpdata/ubuntu-16.04-x86_64/elasticsearch | 2 +- spec/tpdata/ubuntu-16.04-x86_64/icinga2 | 2 +- spec/tpdata/ubuntu-16.04-x86_64/openssh | 2 +- spec/tpdata/ubuntu-16.04-x86_64/postfix | 2 +- spec/tpdata/ubuntu-16.04-x86_64/puppet | 2 +- spec/tpdata/ubuntu-16.04-x86_64/puppet-agent | 2 +- spec/tpdata/ubuntu-16.04-x86_64/rsyslog | 2 +- spec/tpdata/ubuntu-16.04-x86_64/sysdig | 2 +- spec/tpdata/ubuntu-22.04-x86_64/elasticsearch | 2 +- spec/tpdata/ubuntu-22.04-x86_64/icinga2 | 2 +- spec/tpdata/ubuntu-22.04-x86_64/openssh | 2 +- spec/tpdata/ubuntu-22.04-x86_64/rsyslog | 2 +- spec/tpdata/ubuntu-22.04-x86_64/sysdig | 2 +- 46 files changed, 154 insertions(+), 128 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index db2230f3..f724bef4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,7 +8,7 @@ jobs: name: 'Static code analysys' runs-on: ubuntu-latest timeout-minutes: 10 - container: puppet/puppet-dev-tools:4.x + container: puppet/pdk:3.0.0.0 steps: - uses: actions/checkout@v3 - name: Run static validations @@ -20,10 +20,18 @@ jobs: name: 'Unit tests' runs-on: ubuntu-latest timeout-minutes: 60 - container: puppet/puppet-dev-tools:4.x + container: puppet/pdk:3.0.0.0 steps: - uses: actions/checkout@v3 - - name: Run unit tests - run: /usr/local/bin/pdk bundle exec rake spec + - name: Run unit tests on Puppet 8 + run: /usr/local/bin/pdk test unit --puppet-version=8 --parallel env: BUNDLE_WITHOUT: development:system_tests:release + continue-on-error: true + - name: Run unit tests on Puppet 7 + run: /usr/local/bin/pdk test unit --puppet-version=7 --parallel + env: + BUNDLE_WITHOUT: development:system_tests:release + continue-on-error: true + + \ No newline at end of file diff --git a/.puppet-lint.rc b/.puppet-lint.rc index cc96ece0..bcb46ccf 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1 +1,2 @@ --relative +--no-parameter_documentation-check diff --git a/CHANGELOG.md b/CHANGELOG.md index f0967f76..93615207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## 3.10.1 + +- Changed CI containers used +- Unit tests for Puppet 7 and 8 +- Lints and fix on undefined vars +- Updated tp::create_dir + ## 3.10.0 - Added support for $MAJVERSION variable in tinydata diff --git a/Gemfile b/Gemfile index ff9af8b1..eb45bfe5 100644 --- a/Gemfile +++ b/Gemfile @@ -34,13 +34,13 @@ group :development do gem "rubocop", '= 1.48.1', require: false gem "rubocop-performance", '= 1.16.0', require: false gem "rubocop-rspec", '= 2.19.0', require: false - gem "puppet-strings", '~> 3.0', require: false + gem "puppet-strings", '~> 2.0', require: false gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] end -group :system_tests do - gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] - gem "serverspec", '~> 2.41', require: false -end +#group :system_tests do +# gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] +# gem "serverspec", '~> 2.41', require: false +#end puppet_version = ENV['PUPPET_GEM_VERSION'] facter_version = ENV['FACTER_GEM_VERSION'] diff --git a/README-legacy.md b/README-legacy.md index 293398ea..7455796a 100644 --- a/README-legacy.md +++ b/README-legacy.md @@ -178,7 +178,7 @@ Configure the application main configuration file a custom erb template which us tp::conf { 'rsyslog': template => 'site/rsyslog/rsyslog.conf.erb', - options_hash => hiera('rsyslog::options_hash'), + options_hash => lookup('rsyslog::options_hash'), } Populate any custom directory from a Git repository (it requires Puppet Labs' vcsrepo module): diff --git a/README.md b/README.md index 98fb2bde..25472998 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ Configure the application main configuration file a custom erb template which us tp::conf { 'rsyslog': template => 'site/rsyslog/rsyslog.conf.erb', - options_hash => hiera('rsyslog::options_hash'), + options_hash => lookup('rsyslog::options_hash'), } Populate any custom directory from a Git repository (it requires Puppet Labs' vcsrepo module): diff --git a/manifests/cli.pp b/manifests/cli.pp index 528cd63f..ebfede99 100644 --- a/manifests/cli.pp +++ b/manifests/cli.pp @@ -4,7 +4,7 @@ class tp::cli ( Enum['present','absent'] $ensure = 'present', Boolean $manage_tp = true, - Hash $tp_commands = lookup('tp::tp_commands', {}), + Hash $tp_commands = pick($tp::tp_commands, {}), Hash $options = {}, Boolean $purge_dirs = true, diff --git a/manifests/conf.pp b/manifests/conf.pp index a7f74007..026c83b1 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -53,7 +53,7 @@ # # tp::conf { 'openssh': # template => 'site/openssh/sshd_config', -# options_hash => hiera('openssh::options_hash'), +# options_hash => lookup('openssh::options_hash'), # } # # @@ -237,7 +237,7 @@ Variant[Undef,String] $owner = undef, Variant[Undef,String] $group = undef, - String $path_prefix = '', + String $path_prefix = '', # lint:ignore:params_empty_string_assignment Boolean $path_parent_create = false, Variant[Boolean,String] $config_file_notify = true, @@ -300,20 +300,20 @@ $real_path = "${path_prefix}${calculated_path}" $local_file_params = delete_undef_values({ - 'path' => $real_path, - 'mode' => $mode, - 'owner' => $owner, - 'group' => $group, + 'path' => $real_path, + 'mode' => $mode, + 'owner' => $owner, + 'group' => $group, }) $local_settings = delete_undef_values({ - "${prefix}files" => { - "${base_file}" => $local_file_params, - }, - "${base_file}_file_mode" => $mode, - "${base_file}_file_owner" => $owner, - "${base_file}_file_group" => $group, - "${base_file}_file_path" => $real_path, + "${prefix}files" => { + "${base_file}" => $local_file_params, + }, + "${base_file}_file_mode" => $mode, + "${base_file}_file_owner" => $owner, + "${base_file}_file_group" => $group, + "${base_file}_file_path" => $real_path, }) $settings = deep_merge($tp_settings,$settings_hash,$my_settings,$local_settings) diff --git a/manifests/create_dir.pp b/manifests/create_dir.pp index a34b8f57..01ed3860 100644 --- a/manifests/create_dir.pp +++ b/manifests/create_dir.pp @@ -10,34 +10,46 @@ define tp::create_dir ( Optional[String] $owner = undef, Optional[String] $group = undef, - Optional[String] $mode = undef, + Optional[Stdlib::Filemode] $mode = undef, Stdlib::AbsolutePath $path = $title, ) { - exec { "mkdir -p ${title}": - command => "mkdir -p ${path}", - path => $facts['path'], - creates => $path, + $mkdir_command = $facts['os']['family'] ? { + 'windows' => "New-Item -ItemType Directory -Force -Path '${path}'", + default => "mkdir -p '${path}'", } - if $owner { - exec { "chown ${owner} ${title}": - command => "chown ${owner} ${path}", - path => $facts['path'], - onlyif => "[ $(ls -ld ${path} | awk '{ print \$3 }') != ${owner} ]", - } + $command_provider = $facts['os']['family'] ? { + 'windows' => 'powershell', + default => undef, } - if $group { - exec { "chgrp ${group} ${title}": - command => "chgrp ${group} ${path}", - path => $facts['path'], - onlyif => "[ $(ls -ld ${path} | awk '{ print \$4 }') != ${group} ]", - } + + exec { "Create directory ${title}": + command => $mkdir_command, + path => $facts['path'], + creates => $path, + provider => $command_provider, } - if $mode { - exec { "chmod ${mode} ${title}": - command => "chmod ${mode} ${path}", - path => $facts['path'], - subscribe => Exec["mkdir -p ${title}"], - refreshonly => true, + + if $facts['os']['family'] != 'windows' { + if $owner { + exec { "chown ${owner} ${title}": + command => "chown '${owner}' '${path}'", + path => $facts['path'], + onlyif => "[ \$(stat -c '%U' '${path}') != '${owner}' ]", + } + } + if $group { + exec { "chgrp ${group} ${title}": + command => "chgrp '${group}' '${path}'", + path => $facts['path'], + onlyif => "[ \$(stat -c '%G' '${path}') != '${group}' ]", + } + } + if $mode { + exec { "chmod ${mode} ${title}": + command => "chmod '${mode}' '${path}'", + path => '/bin:/sbin:/usr/sbin:/usr/bin', + onlyif => "[ 0\$(stat -c '%a' '${path}') != '${mode}' ]", + } } } } diff --git a/manifests/dir.pp b/manifests/dir.pp index bc7d504c..6bb4c97c 100644 --- a/manifests/dir.pp +++ b/manifests/dir.pp @@ -155,7 +155,7 @@ Enum['global','user'] $scope = 'global', - String $path_prefix = '', + String $path_prefix = '', # lint:ignore:params_empty_string_assignment Boolean $path_parent_create = false, Variant[Boolean,String] $config_dir_notify = true, @@ -213,30 +213,30 @@ $real_path = "${path_prefix}${calculated_path}" $local_file_params = delete_undef_values({ - 'path' => $real_path, - 'mode' => $mode, - 'owner' => $owner, - 'group' => $group, - 'recurse' => $recurse, - 'purge' => $purge, - 'force' => $force, + 'path' => $real_path, + 'mode' => $mode, + 'owner' => $owner, + 'group' => $group, + 'recurse' => $recurse, + 'purge' => $purge, + 'force' => $force, }) $local_settings = delete_undef_values({ - "${prefix}dirs" => { - "${base_dir}" => $local_file_params, - }, - "${base_dir}_dir_mode" => $mode, - "${base_dir}_dir_owner" => $owner, - "${base_dir}_dir_group" => $group, - "${base_dir}_dir_path" => $real_path, - "${base_dir}_dir_recurse" => $recurse, - "${base_dir}_dir_purge" => $purge, - "${base_dir}_dir_force" => $force, + "${prefix}dirs" => { + "${base_dir}" => $local_file_params, + }, + "${base_dir}_dir_mode" => $mode, + "${base_dir}_dir_owner" => $owner, + "${base_dir}_dir_group" => $group, + "${base_dir}_dir_path" => $real_path, + "${base_dir}_dir_recurse" => $recurse, + "${base_dir}_dir_purge" => $purge, + "${base_dir}_dir_force" => $force, }) $settings = deep_merge($tp_settings,$settings_hash,$my_settings,$local_settings) - $real_mode = pick_default(getvar("settings.${base_dir}_dir_mode"), getvar("settings.${prefix}dirs.${base_dir}.mode"), getvar('settings.config_dir_mode'), undef) + $real_mode = pick_default(getvar("settings.${base_dir}_dir_mode"), getvar("settings.${prefix}dirs.${base_dir}.mode"), getvar('settings.config_dir_mode'), '0755') $real_owner = pick_default(getvar("settings.${base_dir}_dir_owner"), getvar("settings.${prefix}dirs.${base_dir}.owner"), getvar('settings.config_dir_owner'), undef) $real_group = pick_default(getvar("settings.${base_dir}_dir_group"), getvar("settings.${prefix}dirs.${base_dir}.group"), getvar('settings.config_dir_group'), undef) $real_recurse = pick_default(getvar("settings.${base_dir}_dir_recurse"), getvar("settings.${prefix}dirs.${base_dir}.recurse"), getvar('settings.config__dir_recurse'), undef) @@ -314,7 +314,7 @@ notify => $real_notify, recurse => $real_recurse, purge => $real_purge, - # force => $real_force, + # force => $real_force, } file { $real_path: * => $file_params + pick(getvar("settings.${base_dir}_dir_params"),getvar("settings.${prefix}dirs.${base_dir}.params"), {}), diff --git a/manifests/init.pp b/manifests/init.pp index 226d6265..4a77af88 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -34,10 +34,10 @@ String $tp_group = 'root', String $tp_mode = '0755', String $check_service_command = 'puppet resource service', - String $check_service_command_post = '', + String $check_service_command_post = '', # lint:ignore:params_empty_string_assignment String $check_package_command = 'puppet resource package', - String $check_repo_path = '', - String $check_repo_path_post = '', + String $check_repo_path = '', # lint:ignore:params_empty_string_assignment + String $check_repo_path_post = '', # lint:ignore:params_empty_string_assignment #Stdlib::Absolutepath $tp_dir = '/etc/tp', Optional[String] $ruby_path = undef, String $lib_source = 'puppet:///modules/tp/lib/', diff --git a/manifests/install.pp b/manifests/install.pp index fb3e8e48..ac773ffb 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -187,7 +187,7 @@ Hash $tp_repo_params = {}, Boolean $manage_package = true, Boolean $manage_service = true, - Boolean $apt_safe_trusted_key = lookup('tp::apt_safe_trusted_key', Boolean , first, false), + Boolean $apt_safe_trusted_key = pick(getvar('tp::apt_safe_trusted_key'), false), Boolean $cli_enable = pick(getvar('tp::cli_enable'), false), Boolean $puppi_enable = false, @@ -239,11 +239,11 @@ $extracted_file = getvar('tp_settings.release.extracted_file') $local_settings = delete_undef_values({ - install_method => $real_install_method, - repo => $repo, - upstream_repo => $upstream_repo, + install_method => getvar('real_install_method'), + repo => getvar('repo'), + upstream_repo => getvar('upstream_repo'), git_source => $real_install_method ? { - 'source' => $source, + 'source' => getvar('source'), default => undef, }, destination => $real_install_method ? { @@ -252,20 +252,18 @@ default => undef, }, packages => delete_undef_values({ - main => delete_undef_values({ name => tp::title_replace(getvar('settings.packages.main.name'),$app), }), - }), release => delete_undef_values({ - base_url => pick_default($real_base_url), - file_name => $real_filename, - url => $real_url, - extracted_dir => $extracted_dir, - extracted_file => $extracted_file, - setup => delete_undef_values({ - enable => getvar('tp_settings.release.setup.enable'), - links => getvar('tp_settings.release.setup.links'), - }), + base_url => getvar('real_base_url'), + file_name => getvar('real_filename'), + url => getvar('real_url'), + extracted_dir => getvar('extracted_dir'), + extracted_file => getvar('extracted_file'), + setup => delete_undef_values({ + enable => getvar('tp_settings.release.setup.enable'), + links => getvar('tp_settings.release.setup.links'), + }), }), }) @@ -289,7 +287,7 @@ tp::setup { "tp::install::${real_install_method} ${app}": ensure => $ensure, version => $real_version, - install_method => $real_install_method, + install_method => $real_install_method, source_dir => getvar('settings.destination'), app => $app, on_missing_data => $on_missing_data, diff --git a/manifests/install/package.pp b/manifests/install/package.pp index f0380cc8..e12aa2e9 100644 --- a/manifests/install/package.pp +++ b/manifests/install/package.pp @@ -104,7 +104,7 @@ Hash $tp_repo_params = {}, Boolean $manage_package = true, Boolean $manage_service = true, - Boolean $apt_safe_trusted_key = lookup('tp::apt_safe_trusted_key', Boolean , first, false), + Boolean $apt_safe_trusted_key = pick(getvar('tp::apt_safe_trusted_key'), false), String[1] $data_module = 'tinydata', @@ -345,7 +345,7 @@ } $services.each |$k| { service { $k: - * => $service_defaults + pick(getvar("settings.services.${kk}.params"), getvar('settings.service_params'), {}), + * => $service_defaults + pick(getvar("settings.services.${k}.params"), getvar('settings.service_params'), {}), } } } diff --git a/manifests/repo.pp b/manifests/repo.pp index 80d4bc38..78849494 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -29,7 +29,7 @@ Variant[Undef,String[1]] $apt_release = undef, Variant[Undef,String[1]] $apt_repos = undef, Variant[Undef,String[1]] $apt_pin = undef, - Boolean $apt_safe_trusted_key = lookup('tp::apt_safe_trusted_key', Boolean , first, false), + Boolean $apt_safe_trusted_key = pick(getvar('tp::apt_safe_trusted_key'), false), Stdlib::Absolutepath $apt_gpg_key_dir = '/etc/apt/keyrings', Variant[Undef,String[1]] $zypper_repofile_url = undef, diff --git a/manifests/setup.pp b/manifests/setup.pp index 9f32711e..87340a3c 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -7,8 +7,8 @@ # tp::setup { 'namevar': } define tp::setup ( Tp::Install_method $install_method, - Optional[StdLib::Absolutepath] $source_dir, String $app, + Optional[StdLib::Absolutepath] $source_dir = undef, Variant[Boolean,String] $ensure = present, Optional[String] $version = undef, Tp::Fail $on_missing_data = pick(getvar('tp::on_missing_data'),'notify'), diff --git a/manifests/stdmod.pp b/manifests/stdmod.pp index 03915bd0..f8d9518f 100644 --- a/manifests/stdmod.pp +++ b/manifests/stdmod.pp @@ -109,7 +109,7 @@ default => $service_ensure, } $config_dir_ensure = directory - $config_file_ensure = present + $config_file_ensure = file } # Dependency class @@ -173,7 +173,7 @@ if $debug == true { $debug_scope = inline_template('<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|path|timestamp|free|.*password.*)/ } %>') file { "tp_stdmod_debug_${title}": - ensure => present, + ensure => $config_file_ensure , content => $debug_scope, path => "${debug_dir}/tp_stdmod_debug_${title}", } diff --git a/metadata.json b/metadata.json index ea9c5dce..a04eb736 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "example42-tp", - "version": "3.10.0", + "version": "3.10.1", "author": "example42", "summary": "Tiny Puppet", "license": "Apache-2.0", diff --git a/spec/defines/stdmod_spec.rb b/spec/defines/stdmod_spec.rb index 0aee2bb2..fd23edd3 100644 --- a/spec/defines/stdmod_spec.rb +++ b/spec/defines/stdmod_spec.rb @@ -19,7 +19,7 @@ 'enable' => true, } default_file_params = { - 'ensure' => 'present', + 'ensure' => 'file', 'owner' => 'root', 'group' => 'root', 'mode' => '0644', @@ -76,7 +76,7 @@ 'debug' => true, 'debug_dir' => '/var/tmp', } end - it { is_expected.to contain_file("tp_stdmod_debug_#{app}").with('ensure' => 'present', 'path' => "/var/tmp/tp_stdmod_debug_#{app}") } + it { is_expected.to contain_file("tp_stdmod_debug_#{app}").with('ensure' => 'file', 'path' => "/var/tmp/tp_stdmod_debug_#{app}") } end end end diff --git a/spec/functions/tp_lookup_spec.rb b/spec/functions/tp_lookup_spec.rb index d9ab9101..9c7bbf61 100644 --- a/spec/functions/tp_lookup_spec.rb +++ b/spec/functions/tp_lookup_spec.rb @@ -13,10 +13,10 @@ expect(Puppet::Parser::Functions.function("tp_lookup")).to eq("function_tp_lookup") end - it "should raise a ParseError if there are less than 3 arguments" do - expect { scope.function_tp_lookup(["1"]) }.to( raise_error(Puppet::Error)) - expect { scope.function_tp_lookup(["1","2"]) }.to( raise_error(Puppet::Error)) - end + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { is_expected.to run.with_params(["1"]).and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { is_expected.to run.with_params(["1","2"]).and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + end apps.each do | app | appdata=YAML.safe_load(File.read(File.join(File.dirname(__FILE__), "../tpdata/#{os}/#{app}"))) diff --git a/spec/tpdata/centos-7-x86_64/elasticsearch b/spec/tpdata/centos-7-x86_64/elasticsearch index 0a6bc216..02665cac 100644 --- a/spec/tpdata/centos-7-x86_64/elasticsearch +++ b/spec/tpdata/centos-7-x86_64/elasticsearch @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true repo_package_provider: rpm diff --git a/spec/tpdata/centos-7-x86_64/gitlab-runner b/spec/tpdata/centos-7-x86_64/gitlab-runner index f7315ae0..9dfd28d1 100644 --- a/spec/tpdata/centos-7-x86_64/gitlab-runner +++ b/spec/tpdata/centos-7-x86_64/gitlab-runner @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: gitlab-ci-multi-runner diff --git a/spec/tpdata/centos-7-x86_64/icinga2 b/spec/tpdata/centos-7-x86_64/icinga2 index b5a35033..4cbf44bd 100644 --- a/spec/tpdata/centos-7-x86_64/icinga2 +++ b/spec/tpdata/centos-7-x86_64/icinga2 @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0640' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: icinga2 diff --git a/spec/tpdata/centos-7-x86_64/openssh b/spec/tpdata/centos-7-x86_64/openssh index 41f2e8cd..01d05a2e 100644 --- a/spec/tpdata/centos-7-x86_64/openssh +++ b/spec/tpdata/centos-7-x86_64/openssh @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0600' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: openssh-server diff --git a/spec/tpdata/centos-7-x86_64/postfix b/spec/tpdata/centos-7-x86_64/postfix index e4037838..a90db5f6 100644 --- a/spec/tpdata/centos-7-x86_64/postfix +++ b/spec/tpdata/centos-7-x86_64/postfix @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: postfix diff --git a/spec/tpdata/centos-7-x86_64/puppet b/spec/tpdata/centos-7-x86_64/puppet index 66bf5e0a..ff9dcad8 100644 --- a/spec/tpdata/centos-7-x86_64/puppet +++ b/spec/tpdata/centos-7-x86_64/puppet @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: puppet-agent diff --git a/spec/tpdata/centos-7-x86_64/puppet-agent b/spec/tpdata/centos-7-x86_64/puppet-agent index 66bf5e0a..ff9dcad8 100644 --- a/spec/tpdata/centos-7-x86_64/puppet-agent +++ b/spec/tpdata/centos-7-x86_64/puppet-agent @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: puppet-agent diff --git a/spec/tpdata/centos-7-x86_64/rsyslog b/spec/tpdata/centos-7-x86_64/rsyslog index e92edb86..eee4aaed 100644 --- a/spec/tpdata/centos-7-x86_64/rsyslog +++ b/spec/tpdata/centos-7-x86_64/rsyslog @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: rsyslog diff --git a/spec/tpdata/centos-7-x86_64/sysdig b/spec/tpdata/centos-7-x86_64/sysdig index ecb2424c..28de23d8 100644 --- a/spec/tpdata/centos-7-x86_64/sysdig +++ b/spec/tpdata/centos-7-x86_64/sysdig @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: sysdig diff --git a/spec/tpdata/redhat-8-x86_64/elasticsearch b/spec/tpdata/redhat-8-x86_64/elasticsearch index da96f74a..8c059b21 100644 --- a/spec/tpdata/redhat-8-x86_64/elasticsearch +++ b/spec/tpdata/redhat-8-x86_64/elasticsearch @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/redhat-8-x86_64/icinga2 b/spec/tpdata/redhat-8-x86_64/icinga2 index b3b531e9..81129f04 100644 --- a/spec/tpdata/redhat-8-x86_64/icinga2 +++ b/spec/tpdata/redhat-8-x86_64/icinga2 @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0640' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/redhat-8-x86_64/openssh b/spec/tpdata/redhat-8-x86_64/openssh index bb0d606a..f08f1707 100644 --- a/spec/tpdata/redhat-8-x86_64/openssh +++ b/spec/tpdata/redhat-8-x86_64/openssh @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0600' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/redhat-8-x86_64/rsyslog b/spec/tpdata/redhat-8-x86_64/rsyslog index 06364c00..faae9d2e 100644 --- a/spec/tpdata/redhat-8-x86_64/rsyslog +++ b/spec/tpdata/redhat-8-x86_64/rsyslog @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/redhat-8-x86_64/sysdig b/spec/tpdata/redhat-8-x86_64/sysdig index bce354c6..1f663a03 100644 --- a/spec/tpdata/redhat-8-x86_64/sysdig +++ b/spec/tpdata/redhat-8-x86_64/sysdig @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/ubuntu-16.04-x86_64/elasticsearch b/spec/tpdata/ubuntu-16.04-x86_64/elasticsearch index f4c55e11..27df8fdf 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/elasticsearch +++ b/spec/tpdata/ubuntu-16.04-x86_64/elasticsearch @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: elasticsearch diff --git a/spec/tpdata/ubuntu-16.04-x86_64/icinga2 b/spec/tpdata/ubuntu-16.04-x86_64/icinga2 index 24155cf6..a889925b 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/icinga2 +++ b/spec/tpdata/ubuntu-16.04-x86_64/icinga2 @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: icinga2 diff --git a/spec/tpdata/ubuntu-16.04-x86_64/openssh b/spec/tpdata/ubuntu-16.04-x86_64/openssh index 104abe46..cc3213aa 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/openssh +++ b/spec/tpdata/ubuntu-16.04-x86_64/openssh @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: openssh-server diff --git a/spec/tpdata/ubuntu-16.04-x86_64/postfix b/spec/tpdata/ubuntu-16.04-x86_64/postfix index 52bf4059..a742ee2e 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/postfix +++ b/spec/tpdata/ubuntu-16.04-x86_64/postfix @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: postfix diff --git a/spec/tpdata/ubuntu-16.04-x86_64/puppet b/spec/tpdata/ubuntu-16.04-x86_64/puppet index a7cf4897..619bce6a 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/puppet +++ b/spec/tpdata/ubuntu-16.04-x86_64/puppet @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: puppet-agent diff --git a/spec/tpdata/ubuntu-16.04-x86_64/puppet-agent b/spec/tpdata/ubuntu-16.04-x86_64/puppet-agent index a7cf4897..619bce6a 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/puppet-agent +++ b/spec/tpdata/ubuntu-16.04-x86_64/puppet-agent @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: puppet-agent diff --git a/spec/tpdata/ubuntu-16.04-x86_64/rsyslog b/spec/tpdata/ubuntu-16.04-x86_64/rsyslog index f51fb961..29673a61 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/rsyslog +++ b/spec/tpdata/ubuntu-16.04-x86_64/rsyslog @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true package_name: rsyslog diff --git a/spec/tpdata/ubuntu-16.04-x86_64/sysdig b/spec/tpdata/ubuntu-16.04-x86_64/sysdig index 95483d91..db9102ac 100644 --- a/spec/tpdata/ubuntu-16.04-x86_64/sysdig +++ b/spec/tpdata/ubuntu-16.04-x86_64/sysdig @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true repo_package_provider: dpkg diff --git a/spec/tpdata/ubuntu-22.04-x86_64/elasticsearch b/spec/tpdata/ubuntu-22.04-x86_64/elasticsearch index d743658e..af86a51b 100644 --- a/spec/tpdata/ubuntu-22.04-x86_64/elasticsearch +++ b/spec/tpdata/ubuntu-22.04-x86_64/elasticsearch @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/ubuntu-22.04-x86_64/icinga2 b/spec/tpdata/ubuntu-22.04-x86_64/icinga2 index d461d38b..8a978503 100644 --- a/spec/tpdata/ubuntu-22.04-x86_64/icinga2 +++ b/spec/tpdata/ubuntu-22.04-x86_64/icinga2 @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/ubuntu-22.04-x86_64/openssh b/spec/tpdata/ubuntu-22.04-x86_64/openssh index d382ac1d..8aac5e2e 100644 --- a/spec/tpdata/ubuntu-22.04-x86_64/openssh +++ b/spec/tpdata/ubuntu-22.04-x86_64/openssh @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/ubuntu-22.04-x86_64/rsyslog b/spec/tpdata/ubuntu-22.04-x86_64/rsyslog index af28736a..c4274c37 100644 --- a/spec/tpdata/ubuntu-22.04-x86_64/rsyslog +++ b/spec/tpdata/ubuntu-22.04-x86_64/rsyslog @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package diff --git a/spec/tpdata/ubuntu-22.04-x86_64/sysdig b/spec/tpdata/ubuntu-22.04-x86_64/sysdig index 9a9aca33..27b78e46 100644 --- a/spec/tpdata/ubuntu-22.04-x86_64/sysdig +++ b/spec/tpdata/ubuntu-22.04-x86_64/sysdig @@ -8,7 +8,7 @@ config_file_group: root config_file_mode: '0644' config_dir_owner: root config_dir_group: root -config_dir_mode: '0755' +config_dir_mode: '0644' config_dir_purge: false config_dir_recurse: true install_method: package