Skip to content

Commit

Permalink
Remove duplicate service declaration and pry
Browse files Browse the repository at this point in the history
Also remove unnecessary require
  • Loading branch information
m0dular committed Aug 15, 2022
1 parent 3741d1f commit eb459a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
18 changes: 5 additions & 13 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'] ? {
Expand Down Expand Up @@ -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'],
}
}

Expand Down
1 change: 0 additions & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'spec_helper'
require 'pry'

describe 'influxdb' do
let(:facts) { { os: { family: 'RedHat' }, identity: { user: 'root' } } }
Expand Down

0 comments on commit eb459a3

Please sign in to comment.