Skip to content

Commit

Permalink
add some fact checks to not add php5.6 repo to new alma/redhat system…
Browse files Browse the repository at this point in the history
…s - because remi url for php 5.6 is not valid for alma and redhat 8/9
  • Loading branch information
Christian Sarazin committed Jun 26, 2024
1 parent 095a407 commit 363fddf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions manifests/repo/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,27 @@
default => '$releasever', # Yum var
}

$basearch = $facts['architecture'] ? {

Check warning on line 17 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

legacy fact 'architecture' (check: legacy_facts)
default => '$basearch', # Yum var
}

yumrepo { 'remi':
descr => 'Remi\'s RPM repository for Enterprise Linux $releasever - $basearch',
mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/remi/mirror",
mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/remi/${basearch}/mirror",
enabled => 1,
gpgcheck => 1,
gpgkey => 'https://rpms.remirepo.net/RPM-GPG-KEY-remi',
priority => 1,
}

if (! ($facts['os']['name'] in ['AlmaLinux','Redhat'])) and ($facts['distro']['major'] in ['8','9']) {

Check failure on line 30 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

there should be a single space before an opening brace (check: manifest_whitespace_opening_brace_before)

Check warning on line 30 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 2 chars and is 0 (check: strict_indent)
yumrepo { 'remi-php56':

Check warning on line 31 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 4 chars and is 2 (check: strict_indent)
descr => 'Remi\'s PHP 5.6 RPM repository for Enterprise Linux $releasever - $basearch',

Check warning on line 32 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 6 chars and is 4 (check: strict_indent)
mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/php56/mirror",
mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/php56/${basearch}/mirror",

Check warning on line 33 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 6 chars and is 4 (check: strict_indent)
enabled => 1,

Check warning on line 34 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 6 chars and is 4 (check: strict_indent)
gpgcheck => 1,

Check warning on line 35 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 6 chars and is 4 (check: strict_indent)
gpgkey => 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023',

Check warning on line 36 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 6 chars and is 4 (check: strict_indent)
priority => 1,

Check warning on line 37 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 6 chars and is 4 (check: strict_indent)
}

Check warning on line 38 in manifests/repo/redhat.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

indent should be 4 chars and is 2 (check: strict_indent)
}
}

0 comments on commit 363fddf

Please sign in to comment.