From c5bddd9e193806a40cfe12b3abed2704abb88f7a Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 23 Nov 2016 09:47:20 -0800 Subject: [PATCH] Hack to support service on xenial Xenial uses systemd which does have a sysv init script compatbility layer but you must instruct systemd to reload its config after installing any init scripts for this to work. Hack this in by adding an exec for `systemctl daemon-reload` between writing the file and starting the wildlfy service. Ideally the wildfly module would do this for us but this should work for now (and eventually will become redundant). Change-Id: If5c09c0be7714ce7d03ebf364823164a34c29ae4 --- manifests/wildfly.pp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifests/wildfly.pp b/manifests/wildfly.pp index 89896a9..9b67d54 100644 --- a/manifests/wildfly.pp +++ b/manifests/wildfly.pp @@ -25,6 +25,17 @@ class zanata::wildfly( ensure => present, } + if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') { + # This is a hack to make sure that systemd is aware of the new service + # before we attempt to start it. + exec { 'wildfly-systemd-daemon-reload': + command => '/usr/bin/systemctl daemon-reload', + before => Service['wildfly'], + subscribe => File['/etc/init.d/wildfly'], + refreshonly => true, + } + } + class { '::wildfly': version => $wildfly_version, install_source => $wildfly_install_source,