Skip to content

Commit

Permalink
(*) Capitalize bare words used to ref class names
Browse files Browse the repository at this point in the history
Resolves these errors:

```
Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Invalid relationship: File[/etc/sudoers.d/perfsonar_sudo] { require => Class[perfsonar] }, because Class[perfsonar] doesn't seem to be in the catalog
```

```
Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Invalid relationship: File[/etc/NetworkManager/dispatcher.d/50-eno1] { notify => Class[network] }, because Class[network] doesn't seem to be in the catalog
```
  • Loading branch information
jhoblitt committed Nov 10, 2023
1 parent 3aea145 commit 1b478f9
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion hieradata/role/perfsonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ files:
# perfsonar packaging installs this one file with the wrong mode
"/etc/sudoers.d/perfsonar_sudo":
mode: "0440"
require: "Class[perfsonar]"
require: "Class[Perfsonar]"

# The perfsonar class does not allow a pS version to be set.
# The yumrepo mirror list used:
Expand Down
2 changes: 1 addition & 1 deletion site/profile/manifests/ccs/postfix.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
}

ensure_packages($packages)
Package[$packages] -> Class[postfix]
Package[$packages] -> Class['postfix']
}
2 changes: 1 addition & 1 deletion site/profile/manifests/core/common.pp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
include profile::core::ipa

# prevent ipa packages from being installed before versionlocks are set
Yum::Versionlock<| |> -> Class[ipa]
Yum::Versionlock<| |> -> Class['ipa']

# run ipa-install-* script before X
Class[ipa] -> Class[ssh]
Expand Down
2 changes: 1 addition & 1 deletion site/profile/manifests/core/ipa.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

$param_defaults = {
'path' => '/etc/ipa/default.conf',
require => Class[ipa],
require => Class['ipa'],
}

if $default {
Expand Down
2 changes: 1 addition & 1 deletion site/profile/manifests/core/krb5.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
include mit_krb5

# run ipa-install-* script before trying to managing krb5.conf
Class[ipa] -> Class[mit_krb5]
Class['ipa'] -> Class['mit_krb5']

# create /etc/krb5.conf.d files only on EL8+
unless fact('os.family') == 'RedHat' and fact('os.release.major') == '7' {
Expand Down
6 changes: 3 additions & 3 deletions site/profile/manifests/core/nm_dispatch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# if restart is configured to be only per interface... needs some experimentation
#$network_notify = "Exec[network_restart_${dev}]"
$network_notify = fact('os.release.major') ? {
'7' => 'Class[network]',
default => 'Class[nm]',
'7' => 'network',
default => 'nm',
}

$data = {
Expand All @@ -28,7 +28,7 @@
ensure => file,
content => epp("${module_name}/core/nm_interface/50-dev.epp", $data),
mode => '0755',
notify => $network_notify,
notify => Class[$network_notify],
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions site/profile/manifests/core/rke.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
profile::util::keytab { $user:
uid => $uid,
keytab_base64 => $keytab_base64,
require => Class[ipa], # ipa must be setup to use the rke user
require => Class['ipa'], # ipa must be setup to use the rke user
}
}

Expand All @@ -42,7 +42,7 @@
user => $user,
owner => $user,
group => $user,
require => Class[ipa], # ipa must be setup to use the rke user
require => Class['ipa'], # ipa must be setup to use the rke user
}

$rke_checksum = $version ? {
Expand Down
4 changes: 2 additions & 2 deletions site/profile/manifests/core/sssd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require ipa
contain sssd

Class[ipa] -> Class[sssd]
Class['ipa'] -> Class['sssd']

if fact('os.family') == 'RedHat' {
# disable sssd socket activation and services which should be started by
Expand All @@ -30,7 +30,7 @@
service { $unit:
ensure => stopped,
enable => false,
require => Class[sssd],
require => Class['sssd'],
}
}
}
Expand Down

0 comments on commit 1b478f9

Please sign in to comment.