Skip to content

Commit dd61f4e

Browse files
authored
Merge pull request #1048 from bastelfreak/smee
profile::core::foreman: Make smee installation opt-out
2 parents 36abe40 + f692947 commit dd61f4e

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

site/profile/manifests/core/foreman.pp

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@
1717
# @param foreman_global_parameter
1818
# `foreman_global_parameter` resources to create.
1919
#
20+
# @param manage_smee
21+
# Make smee installation opt-out
22+
#
2023
class profile::core::foreman (
21-
Stdlib::HTTPSUrl $smee_url,
24+
Optional[Stdlib::HTTPSUrl] $smee_url = undef,
2225
Boolean $enable_puppetdb = false,
2326
Optional[Hash[String, Hash]] $foreman_config = undef,
2427
Optional[Hash[String, Hash]] $foreman_hostgroup = undef,
2528
Optional[Hash[String, Hash]] $foreman_global_parameter = undef,
29+
Boolean $manage_smee = true,
2630
) {
2731
include cron
2832
include foreman
@@ -81,10 +85,21 @@
8185
}
8286
}
8387

84-
class { 'smee':
85-
url => $smee_url,
86-
path => '/payload',
87-
port => 8088,
88+
# smee has some startup problems due to too new (?) nodejs on EL8
89+
# https://gist.github.com/bastelfreak/6d0d3bc324633f04c5b1fc432e871192
90+
if $manage_smee {
91+
assert_type(Stdlib::HTTPSUrl, $smee_url)
92+
class { 'smee':
93+
url => $smee_url,
94+
path => '/payload',
95+
port => 8088,
96+
}
97+
cron { 'smee':
98+
command => '/usr/bin/systemctl restart smee > /dev/null 2>&1',
99+
user => 'root',
100+
hour => 4,
101+
minute => 42,
102+
}
88103
}
89104

90105
# el7 systemd is too old to support periodic graceful restarts of a service unit.
@@ -97,13 +112,6 @@
97112
minute => 42,
98113
}
99114

100-
cron { 'smee':
101-
command => '/usr/bin/systemctl restart smee > /dev/null 2>&1',
102-
user => 'root',
103-
hour => 4,
104-
minute => 42,
105-
}
106-
107115
package { 'hiera-eyaml':
108116
provider => 'puppetserver_gem',
109117
}

0 commit comments

Comments
 (0)