diff --git a/.fixtures.yml b/.fixtures.yml index aada0403e..1f6bf35bd 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -13,6 +13,7 @@ fixtures: dns: 'https://github.com/theforeman/puppet-dns' extlib: 'https://github.com/voxpupuli/puppet-extlib' foreman: 'https://github.com/theforeman/puppet-foreman' + mosquitto: 'https://github.com/voxpupuli/puppet-mosquitto' puppet: 'https://github.com/theforeman/puppet-puppet' redis: 'https://github.com/voxpupuli/puppet-redis' stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib' diff --git a/README.md b/README.md index 51253809a..9c15303a6 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Part of the Foreman installer: | 2.x | 1.5 - 1.10 | | | 1.x | 1.4 and older | | +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. 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. 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`. 16.x added support for Smart Proxy Registration feature, available in Smart Proxy 2.3 and newer. diff --git a/manifests/plugin/remote_execution/ssh.pp b/manifests/plugin/remote_execution/ssh.pp index ce2d26081..b2453d22c 100644 --- a/manifests/plugin/remote_execution/ssh.pp +++ b/manifests/plugin/remote_execution/ssh.pp @@ -62,4 +62,10 @@ group => $foreman_proxy::user, } } + + if $mode == 'pull-mqtt' { + class { 'mosquitto': + package_name => 'mosquitto', + } + } } diff --git a/templates/plugin/remote_execution_ssh.yml.erb b/templates/plugin/remote_execution_ssh.yml.erb index 064319210..a5295b55b 100644 --- a/templates/plugin/remote_execution_ssh.yml.erb +++ b/templates/plugin/remote_execution_ssh.yml.erb @@ -1,9 +1,16 @@ --- :enabled: <%= @module_enabled %> +<% if false -%> # TODO: https://projects.theforeman.org/issues/34439 <% end -%> :ssh_identity_key_file: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::ssh_identity_path') %> :local_working_dir: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::local_working_dir') %> :remote_working_dir: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::remote_working_dir') %> +<% if %r(ssh).match(scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode")) -%> :kerberos_auth: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::ssh_kerberos_auth') %> +<% end -%> # Whether to run remote execution jobs asynchronously :mode: <%= scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode") %> +<% if scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode") == 'pull-mqtt' -%> +:mqtt_broker: localhost +:mqtt_port: 1883 +<% end -%>