Skip to content

Commit 1b04094

Browse files
adamruzickaekohl
authored andcommitted
Fixes #35899 - Expose new sp-rex-ssh tunables
1 parent 055bcdc commit 1b04094

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

manifests/plugin/remote_execution/script.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
#
3636
# $listen_on:: Proxy feature listens on https, http, or both
3737
#
38+
# $mqtt_ttl:: Time interval in seconds given to the host to pick up the job before considering the job undelivered.
39+
#
40+
# $mqtt_rate_limit:: Number of jobs that are allowed to run at the same time
41+
#
42+
# $mqtt_resend_interval:: Time interval in seconds at which the notification should be re-sent to the host until the job is picked up or canceleld
43+
#
3844
class foreman_proxy::plugin::remote_execution::script (
3945
Boolean $enabled = true,
4046
Foreman_proxy::ListenOn $listen_on = 'https',
@@ -49,6 +55,9 @@
4955
Enum['ssh', 'ssh-async', 'pull-mqtt'] $mode = 'ssh',
5056
Optional[Foreman_proxy::Sshloglevel] $ssh_log_level = undef,
5157
Boolean $cockpit_integration = true,
58+
Optional[Integer] $mqtt_ttl = undef,
59+
Optional[Integer] $mqtt_rate_limit = undef,
60+
Optional[Integer] $mqtt_resend_interval = undef,
5261
) {
5362
$ssh_identity_path = "${ssh_identity_dir}/${ssh_identity_file}"
5463

templates/plugin/remote_execution_ssh.yml.erb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616

1717
:mqtt_broker: <%= scope.lookupvar("::foreman_proxy::plugin::remote_execution::mosquitto::broker") %>
1818
:mqtt_port: <%= scope.lookupvar("::foreman_proxy::plugin::remote_execution::mosquitto::port") %>
19+
20+
<% if (mqtt_ttl = scope.lookupvar('::foreman_proxy::plugin::remote_execution::script::mqtt_ttl')) -%>
21+
:mqtt_ttl: <%= mqtt_ttl %>
22+
<% end -%>
23+
<% if (mqtt_rate_limit = scope.lookupvar('::foreman_proxy::plugin::remote_execution::script::mqtt_rate_limit')) -%>
24+
:mqtt_rate_limit: <%= mqtt_rate_limit %>
25+
<% end -%>
26+
<% if (mqtt_resend_interval = scope.lookupvar('::foreman_proxy::plugin::remote_execution::script::mqtt_resend_interval')) -%>
27+
:mqtt_resend_interval: <%= mqtt_resend_interval %>
28+
<% end -%>
1929
<% end -%>

0 commit comments

Comments
 (0)