Skip to content

Commit

Permalink
Fix for issue #30 - Add support for Ubuntu 15.04 (systemd).
Browse files Browse the repository at this point in the history
  • Loading branch information
flaccid committed Oct 17, 2015
1 parent 4f8212c commit eb510f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ platforms:
attributes:
system:
primary_interface: eth1
- name: ubuntu-15.04
attributes:
system:
primary_interface: eth1
- name: centos-7.1
attributes:
system:
Expand Down
4 changes: 4 additions & 0 deletions providers/hostname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,15 @@ class Recipe
reload: true
}
service_provider = ::Chef::Provider::Service::Upstart

# Ubuntu moved to systemd
service_provider = ::Chef::Provider::Service::Systemd if node['platform_version'] >= '15.04'
end

service service_name do
supports service_supports
provider service_provider
not_if { service_provider == ::Chef::Provider::Service::Systemd }

This comment has been minimized.

Copy link
@fletchowns

fletchowns Oct 17, 2015

How come the not_if is needed?

This comment has been minimized.

Copy link
@flaccid

flaccid Oct 17, 2015

Author Contributor

Hostname change appears to be preferred by hostnamectl in this distribution release and the hostname systemd service is masked.

action :nothing
end
end
Expand Down

0 comments on commit eb510f1

Please sign in to comment.