diff --git a/manifests/init.pp b/manifests/init.pp index 41b07ff..b16c7fe 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -117,13 +117,9 @@ group => 'root', } file { '/var/lib/influxdb': - ensure => directory, - owner => 'influxdb', - group => 'influxdb', - require => [ - Group['influxdb'], - User['influxdb'], - ] + ensure => directory, + owner => 'influxdb', + group => 'influxdb', } $default_dir = $facts['os']['family'] ? { @@ -168,12 +164,8 @@ # Otherwise, assume we have a source for the package else { package {'influxdb2': - ensure => installed, - before => Service['influxdb'], - } - - service {'influxdb': - ensure => running, + ensure => installed, + before => Service['influxdb'], } } diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index f8b52de..cb16a97 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -1,5 +1,4 @@ require 'spec_helper' -require 'pry' describe 'influxdb' do let(:facts) { { os: { family: 'RedHat' }, identity: { user: 'root' } } }