Skip to content

Commit

Permalink
add dedicated website profile for web + downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni authored and ehelms committed Nov 18, 2024
1 parent 40bd3c0 commit ad76250
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions puppet/data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
stable_release: '3.12'
profiles::web::stable: '%{alias("stable_release")}'
profiles::website::stable: '%{alias("stable_release")}'
profiles::repo::deb::stable: '%{alias("stable_release")}'
profiles::repo::rpm::stable_foreman: '%{alias("stable_release")}'

Expand Down
5 changes: 5 additions & 0 deletions puppet/manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@
include profiles::base
include profiles::repo::rpm
}

node /^website\d+\.[a-z]+\.theforeman\.org$/ {
include profiles::base
include profiles::website
}
16 changes: 16 additions & 0 deletions puppet/modules/profiles/manifests/website.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# @summary A profile for the machines hosting the website and downloads
#
# @param stable
# Latest release that users expect
class profiles::website (
String[1] $stable,
) {
contain web

contain web::vhost::downloads

class { 'web::vhost::web':
stable => $stable,
}
contain web::vhost::web
}
11 changes: 11 additions & 0 deletions puppet/spec/classes/profiles_website_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'spec_helper'

describe 'profiles::website' do
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
end
end
end

0 comments on commit ad76250

Please sign in to comment.