Skip to content

Commit

Permalink
pass $stable to freight::user directly
Browse files Browse the repository at this point in the history
relying on the variable from the profile is a bad idea
  • Loading branch information
evgeni authored and ekohl committed Sep 3, 2024
1 parent 78d1281 commit 7a4715e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion puppet/modules/freight/manifests/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Stdlib::Absolutepath $stagedir,
String $vhost,
Variant[String, Array[String]] $cron_matches,
Optional[String[1]] $stable = undef,
) {
require freight

Expand Down Expand Up @@ -73,7 +74,7 @@
owner => 'root',
group => 'root',
mode => '0644',
content => epp("${module_name}/${vhost}-HEADER.html.epp", { 'stable' => $profiles::web::stable }),
content => epp("${module_name}/${vhost}-HEADER.html.epp", { 'stable' => $stable }),
}
file { "${webdir}/foreman.asc":
ensure => link,
Expand Down
3 changes: 3 additions & 0 deletions puppet/modules/profiles/manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

contain web::vhost::archivedeb

class { 'web::vhost::deb':
stable => $stable,
}
contain web::vhost::deb

class { 'web::vhost::debugs':
Expand Down
2 changes: 2 additions & 0 deletions puppet/modules/web/manifests/vhost/deb.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @summary Set up the deb vhost
# @api private
class web::vhost::deb (
String[1] $stable,
String $user = 'freight',
Stdlib::Absolutepath $home = "/home/${user}",
) {
Expand All @@ -12,6 +13,7 @@
stagedir => '/var/www/freight',
vhost => 'deb',
cron_matches => ['nightly', 'scratch'],
stable => $stable,
}

# Can't use a standard rsync define here as we need to extend the
Expand Down

0 comments on commit 7a4715e

Please sign in to comment.