Skip to content

Commit

Permalink
Remove unnecessary parameters from service
Browse files Browse the repository at this point in the history
The name defaults to the resource title, and both hasstatus ans hasrestart is default
true.
  • Loading branch information
chrekh committed Jul 13, 2020
1 parent 34387c0 commit d04cab9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
8 changes: 2 additions & 6 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
) inherits chrony {
if $service_manage {
service { $service_name:
ensure => $service_ensure,
enable => $service_enable,
name => $service_name,
hasstatus => true,
hasrestart => true,
ensure => $service_ensure,
enable => $service_enable,
}
}

}
6 changes: 0 additions & 6 deletions spec/classes/chrony_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@
is_expected.to contain_service('chrony').with(
ensure: 'running',
enable: true,
hasstatus: true,
hasrestart: true,
)
end
end
Expand All @@ -291,8 +289,6 @@
is_expected.to contain_service('chronyd').with(
ensure: 'running',
enable: true,
hasstatus: true,
hasrestart: true,
)
end
end
Expand All @@ -302,8 +298,6 @@
is_expected.to contain_service('chrony').with(
ensure: 'running',
enable: true,
hasstatus: true,
hasrestart: true,
)
end
end
Expand Down

0 comments on commit d04cab9

Please sign in to comment.