diff --git a/.kitchen.yml b/.kitchen.yml index c54ec89..152e4f4 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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: diff --git a/providers/hostname.rb b/providers/hostname.rb index a95dd60..bf6e9ee 100644 --- a/providers/hostname.rb +++ b/providers/hostname.rb @@ -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 } action :nothing end end