diff --git a/manifests/plugin/remote_execution/ssh.pp b/manifests/plugin/remote_execution/ssh.pp index c309c7c4e..651da81b1 100644 --- a/manifests/plugin/remote_execution/ssh.pp +++ b/manifests/plugin/remote_execution/ssh.pp @@ -53,11 +53,9 @@ listen_on => $listen_on, } - if $ssh_kerberos_auth { - $kerberos_pkg = "${foreman_proxy::params::ruby_package_prefix}net-ssh-krb" - package { $kerberos_pkg: - ensure => present, - } + $kerberos_pkg = "${foreman_proxy::params::ruby_package_prefix}net-ssh-krb" + package { $kerberos_pkg: + ensure => purged, } if $generate_keys { diff --git a/spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb b/spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb index f913e4143..e23277cfd 100644 --- a/spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb +++ b/spec/classes/foreman_proxy__plugin__remote_execution__ssh_spec.rb @@ -29,7 +29,7 @@ end it { should_not contain_file('/root/.ssh') } - it { should_not contain_package(package_name) } + it { should contain_package(package_name).with_ensure('purged') } end describe 'with override parameters' do @@ -66,7 +66,7 @@ it { should_not contain_exec('generate_ssh_key') } it { should_not contain_file('/root/.ssh') } - it { should contain_package(package_name) } + it { should contain_package(package_name).with_ensure('purged') } end describe 'with ssh key generating and installation' do