diff --git a/manifests/guestagent.pp b/manifests/guestagent.pp index 07b577b3..6c3db5f1 100644 --- a/manifests/guestagent.pp +++ b/manifests/guestagent.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether to enable the trove guest agent service -# Defaults to true +# Defaults to false # # [*manage_service*] # (optional) Whether to start/stop the service @@ -83,7 +83,7 @@ # Defaults to undef. # class trove::guestagent( - $enabled = true, + $enabled = false, $manage_service = true, $package_ensure = 'present', $debug = $::os_service_default, diff --git a/manifests/taskmanager.pp b/manifests/taskmanager.pp index 6a926d6d..61e73653 100644 --- a/manifests/taskmanager.pp +++ b/manifests/taskmanager.pp @@ -128,10 +128,7 @@ Please configure options directly with the trove::guestagent class using hiera." require => Anchor['trove::install::end'], } } else { - class {'trove::guestagent': - enabled => false, - manage_service => false, - } + include trove::guestagent } trove_config { diff --git a/releasenotes/notes/guestagent-disable-service-3c4100c486de4c2e.yaml b/releasenotes/notes/guestagent-disable-service-3c4100c486de4c2e.yaml new file mode 100644 index 00000000..08e26c35 --- /dev/null +++ b/releasenotes/notes/guestagent-disable-service-3c4100c486de4c2e.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Now the ``trove-guestagent`` service is disabled by default, because this + service should be run in instances instead of in hosts. The service can be + still enabled by setting the ``trove::guestagent::enabled`` parameter to + ``true`` but this requires careful consideration. diff --git a/spec/classes/trove_guestagent_spec.rb b/spec/classes/trove_guestagent_spec.rb index 38a08033..ab0e13fb 100644 --- a/spec/classes/trove_guestagent_spec.rb +++ b/spec/classes/trove_guestagent_spec.rb @@ -22,9 +22,9 @@ describe 'trove::guestagent' do it 'installs trove-guestagent package and service' do is_expected.to contain_service('trove-guestagent').with( :name => platform_params[:guestagent_service_name], - :ensure => 'running', + :ensure => 'stopped', :hasstatus => true, - :enable => true + :enable => false ) is_expected.to contain_package('trove-guestagent').with( :name => platform_params[:guestagent_package_name], diff --git a/spec/classes/trove_taskmanager_spec.rb b/spec/classes/trove_taskmanager_spec.rb index 21e7cca4..fa40522d 100644 --- a/spec/classes/trove_taskmanager_spec.rb +++ b/spec/classes/trove_taskmanager_spec.rb @@ -62,10 +62,7 @@ describe 'trove::taskmanager' do end it 'configures trove-taskmanager with trove::guestagent' do - is_expected.to contain_class('trove::guestagent').with( - :enabled => false, - :manage_service => false, - ) + is_expected.to contain_class('trove::guestagent') end end end