Skip to content

Commit 56632f1

Browse files
committed
Refs #34239 - [rex_ssh] Install mosquitto with 'pull-mqtt' mode
1 parent 45b4e50 commit 56632f1

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ fixtures:
1313
dns: 'https://github.com/theforeman/puppet-dns'
1414
extlib: 'https://github.com/voxpupuli/puppet-extlib'
1515
foreman: 'https://github.com/theforeman/puppet-foreman'
16+
mosquitto: 'https://github.com/voxpupuli/puppet-mosquitto'
1617
puppet: 'https://github.com/theforeman/puppet-puppet'
1718
redis: 'https://github.com/voxpupuli/puppet-redis'
1819
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Part of the Foreman installer: <https://github.com/theforeman/foreman-installer>
2525
| 2.x | 1.5 - 1.10 | |
2626
| 1.x | 1.4 and older | |
2727

28+
21.x replaced the older `async_ssh` parameter of `foreman_proxy::remote_execution::ssh` with a more generic `mode` parameter, following the change in [smart_proxy_remote_execution_ssh](https://github.com/theforeman/smart_proxy_remote_execution_ssh) itself. This added support for the new `pull-mqtt` mode and - for that specific configuration only - there is a soft dependency on `puppetlabs-mosquitto >= 1.0.1 < 2.0.0` to install Eclipse Mosquitto as the MQTT broker.
2829
20.x started to register as a Smart Proxy host. This requires Foreman 3.1. When using an older Foreman, set `$register_in_foreman` to false. This does require manual registration then.
2930
18.x switched to running `smart_proxy_dynflow` as part of `foreman-proxy` service by default. On EL* distributions and Foreman < 2.5, `foreman_proxy::plugin::dynflow::external_core` needs to be explicitly set to `true`.
3031
16.x added support for Smart Proxy Registration feature, available in Smart Proxy 2.3 and newer.

manifests/plugin/remote_execution/ssh.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,10 @@
6262
group => $foreman_proxy::user,
6363
}
6464
}
65+
66+
if $mode == 'pull-mqtt' {
67+
class { 'mosquitto':
68+
package_name => 'mosquitto',
69+
}
70+
}
6571
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
---
22
:enabled: <%= @module_enabled %>
3+
<% if false -%> # TODO: https://projects.theforeman.org/issues/34439 <% end -%>
34
:ssh_identity_key_file: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::ssh_identity_path') %>
45
:local_working_dir: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::local_working_dir') %>
56
:remote_working_dir: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::remote_working_dir') %>
7+
<% if %r(ssh).match(scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode")) -%>
68
:kerberos_auth: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::ssh_kerberos_auth') %>
9+
<% end -%>
710

811
# Whether to run remote execution jobs asynchronously
912
:mode: <%= scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode") %>
13+
<% if scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode") == 'pull-mqtt' -%>
14+
:mqtt_broker: localhost
15+
:mqtt_port: 1883
16+
<% end -%>

0 commit comments

Comments
 (0)