Skip to content

Commit f011d3c

Browse files
committed
add dedicated debian repo profile
1 parent f4e6455 commit f011d3c

File tree

8 files changed

+57
-10
lines changed

8 files changed

+57
-10
lines changed

Vagrantfile

+11
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,15 @@ Vagrant.configure("2") do |config|
123123
provider.vm.box_url = CENTOS_9_BOX_URL
124124
end
125125
end
126+
127+
config.vm.define "repo-deb" do |override|
128+
override.vm.hostname = "repo-deb"
129+
override.vm.box = "centos/stream9"
130+
131+
override.vm.provider "libvirt" do |libvirt, provider|
132+
libvirt.memory = "2048"
133+
libvirt.machine_virtual_size = 40
134+
provider.vm.box_url = CENTOS_9_BOX_URL
135+
end
136+
end
126137
end

puppet/data/common.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
stable_release: '3.11'
33
profiles::web::stable: '%{alias("stable_release")}'
4+
profiles::repo::deb::stable: '%{alias("stable_release")}'
45

56
backup_servicename: 'backups.theforeman.org'
67
backup_username: 'backup-%{facts.networking.hostname}'

puppet/data/vagrant.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ profiles::jenkins::node::swap_size_mb: 0
2222

2323
profiles::web::https: false
2424

25+
profiles::repo::deb::https: false
26+
2527
redmine::https: false

puppet/manifests/site.pp

+5
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@
4141
include profiles::base
4242
include profiles::web
4343
}
44+
45+
node /^repo-deb\d+\.[a-z]+\.theforeman\.org$/ {
46+
include profiles::base
47+
include profiles::repo::deb
48+
}

puppet/modules/freight/manifests/init.pp

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
# @summary install freight
22
class freight {
3-
if $facts['os']['family'] == 'Debian' {
4-
apt::source { 'freight':
5-
location => 'http://build.openvpn.net/debian/freight_team',
6-
repos => 'main',
7-
key => {
8-
id => '30EBF4E73CCE63EEE124DD278E6DA8B4E158C569',
9-
source => 'https://swupdate.openvpn.net/repos/repo-public.gpg',
10-
},
11-
before => Package['freight'],
12-
}
3+
if $facts['os']['family'] == 'RedHat' {
4+
include epel
5+
Class['Epel'] -> Package['freight']
136
}
147

158
package { 'freight':

puppet/modules/freight/manifests/user.pp

+4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
if $facts['os']['family'] != 'RedHat' or $facts['os']['release']['major'] != '7' {
6565
include apache::mod::expires
6666
}
67+
include apache::mod::alias
68+
include apache::mod::autoindex
69+
include apache::mod::dir
70+
include apache::mod::mime
6771

6872
web::vhost { $vhost:
6973
docroot => $webdir,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# @summary A profile for the debian repo machines
2+
#
3+
# @param stable
4+
# Latest release that users expect
5+
#
6+
# @param https
7+
# Whether to enable HTTPS. This is typically wanted but can only be enabled
8+
# in a 2 pass setup. First Apache needs to run for Letsencrypt to function.
9+
# Then Letsencrypt can be enabled. Also useful to turn off in test setups.
10+
class profiles::repo::deb (
11+
String[1] $stable,
12+
Boolean $https = true,
13+
) {
14+
class { 'web':
15+
https => $https,
16+
}
17+
contain web
18+
19+
contain web::vhost::archivedeb
20+
21+
class { 'web::vhost::deb':
22+
stable => $stable,
23+
}
24+
contain web::vhost::deb
25+
26+
contain web::vhost::stagingdeb
27+
}

vagrant/manifests/default.pp

+4
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@
2525
node /^discourse.*/ {
2626
include profiles::discourse
2727
}
28+
29+
node /^repo-deb.*/ {
30+
include profiles::repo::deb
31+
}

0 commit comments

Comments
 (0)