Skip to content

Commit

Permalink
Fix unit test private key permission
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart Betz committed Jun 28, 2024
1 parent 4a9b446 commit e1461ad
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
before => File[$cert_dir, $conf_dir],
}

if $facts['os']['selinux']['enabled'] and $selinux_package_name {
if fact('os.selinux.enabled') and $facts['os']['selinux']['enabled'] and $selinux_package_name {
package { $selinux_package_name:
ensure => installed,
require => Package[$package_name],
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/elasticsearch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
when 'FreeBSD'
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_user) { 'icinga' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
case facts[:os]['family']
when 'Debian'
let(:icinga2_user) { 'nagios' }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/gelf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
when 'FreeBSD'
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_user) { 'icinga' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
case facts[:os]['family']
when 'Debian'
let(:icinga2_user) { 'nagios' }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/icingadb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
when 'FreeBSD'
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_sslfile_owner) { 'icinga' }
let(:icinga2_sslfile_mode) { '0640' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_sslfile_mode) { '0640' }
case facts[:os]['family']
when 'Debian'
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/idomysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:ido_mysql_schema_dir) { '/usr/local/share/icinga2-ido-mysql/schema' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_user) { 'icinga' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:ido_mysql_schema_dir) { '/usr/share/icinga2-ido-mysql/schema' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
case facts[:os]['family']
when 'Debian'
let(:icinga2_user) { 'nagios' }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/idopgsql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:ido_pgsql_schema_dir) { '/usr/local/share/icinga2-ido-pgsql/schema' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_user) { 'icinga' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:ido_pgsql_schema_dir) { '/usr/share/icinga2-ido-pgsql/schema' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
case facts[:os]['family']
when 'Debian'
let(:icinga2_user) { 'nagios' }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/influxdb2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
when 'FreeBSD'
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_user) { 'icinga' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
case facts[:os]['family']
when 'Debian'
let(:icinga2_user) { 'nagios' }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/influxdb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
when 'FreeBSD'
let(:icinga2_conf_dir) { '/usr/local/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
let(:icinga2_user) { 'icinga' }
let(:icinga2_group) { 'icinga' }
else
let(:icinga2_conf_dir) { '/etc/icinga2' }
let(:icinga2_pki_dir) { '/var/lib/icinga2/certs' }
let(:icinga2_sslkey_mode) { '0400' }
let(:icinga2_sslkey_mode) { '0440' }
case facts[:os]['family']
when 'Debian'
let(:icinga2_user) { 'nagios' }
Expand Down

0 comments on commit e1461ad

Please sign in to comment.