Skip to content

Commit 733c429

Browse files
authored
Refs #34239 - Use mode parameter for remote_execution_ssh plugin
The old async_ssh setting is now configured by setting the value of the newly introduced mode parameter to ssh-async. See the commit which introduced this change for more information: theforeman/smart_proxy_remote_execution_ssh@611f315 This is part of version 0.5.0, which is included since Foreman 3.1.
1 parent 632c866 commit 733c429

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

manifests/plugin/remote_execution/ssh.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# === Parameters:
66
#
7+
# $mode:: Operation Mode of the plugin.
8+
#
79
# $generate_keys:: Automatically generate SSH keys
810
#
911
# $install_key:: Automatically install generated SSH key to root authorized keys
@@ -27,8 +29,6 @@
2729
#
2830
# $listen_on:: Proxy feature listens on https, http, or both
2931
#
30-
# $async_ssh:: Whether to run remote execution jobs asynchronously.
31-
#
3232
class foreman_proxy::plugin::remote_execution::ssh (
3333
Boolean $enabled = true,
3434
Foreman_proxy::ListenOn $listen_on = 'https',
@@ -40,7 +40,7 @@
4040
Stdlib::Absolutepath $local_working_dir = '/var/tmp',
4141
Stdlib::Absolutepath $remote_working_dir = '/var/tmp',
4242
Boolean $ssh_kerberos_auth = false,
43-
Boolean $async_ssh = false,
43+
Enum['ssh', 'ssh-async'] $mode = 'ssh'
4444
) {
4545

4646
$ssh_identity_path = "${ssh_identity_dir}/${ssh_identity_file}"

spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
:ssh_identity_file => 'id_rsa',
4444
:install_key => true,
4545
:ssh_kerberos_auth => true,
46-
:async_ssh => true,
46+
:mode => 'ssh-async',
4747
} end
4848

4949
it { should contain_class('foreman_proxy::plugin::dynflow') }
@@ -56,7 +56,7 @@
5656
with_content(%r{:local_working_dir: /tmp}).
5757
with_content(%r{:remote_working_dir: /tmp}).
5858
with_content(%r{:kerberos_auth: true}).
59-
with_content(%r{:async_ssh: true}).
59+
with_content(%r{:mode: ssh-async}).
6060
with({
6161
:ensure => 'file',
6262
:owner => 'root',

templates/plugin/remote_execution_ssh.yml.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
:kerberos_auth: <%= scope.lookupvar('::foreman_proxy::plugin::remote_execution::ssh::ssh_kerberos_auth') %>
77

88
# Whether to run remote execution jobs asynchronously
9-
:async_ssh: <%= scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::async_ssh") %>
9+
:mode: <%= scope.lookupvar("::foreman_proxy::plugin::remote_execution::ssh::mode") %>

0 commit comments

Comments
 (0)