Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371619 )

Change subject: base::service_unit: convert services to systemd::service
......................................................................

base::service_unit: convert services to systemd::service

Bug: T173078
Change-Id: I297df2f3eb27a823c4afbe7ec84d6630484ef2f1
---
M modules/eventlogging/manifests/service/service.pp
M modules/ores/manifests/precached.pp
M modules/pdfrender/manifests/init.pp
3 files changed, 16 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/371619/1

diff --git a/modules/eventlogging/manifests/service/service.pp 
b/modules/eventlogging/manifests/service/service.pp
index 79d8253..55f7982 100644
--- a/modules/eventlogging/manifests/service/service.pp
+++ b/modules/eventlogging/manifests/service/service.pp
@@ -142,11 +142,9 @@
     }
 
     # Use systemd for this eventlogging-service instance.
-    base::service_unit { $service_name:
-        template_name => 'service',
-        systemd       => true,
-        refresh       => false,
-        require       => [
+    systemd::service { $service_name:
+        content => systemd_template('service'),
+        require => [
             File[$config_file],
             File["/etc/rsyslog.d/80-${service_name}.conf"],
             Package['python-tornado'],
diff --git a/modules/ores/manifests/precached.pp 
b/modules/ores/manifests/precached.pp
index 2eb35fe..e9b72f9 100644
--- a/modules/ores/manifests/precached.pp
+++ b/modules/ores/manifests/precached.pp
@@ -8,10 +8,10 @@
     $host = 'https://ores.wmflabs.org'
     $config_dir = "${working_dir}/config"
 
-    base::service_unit { 'precached':
+    systemd::service { 'precached':
         require        => Class['ores::web'],
-        template_name  => 'precached',
-        systemd        => true,
+        content        => systemd_template('precached'),
+        restart        => true,
         service_params => {
             enable     => true,
             hasstatus  => true,
diff --git a/modules/pdfrender/manifests/init.pp 
b/modules/pdfrender/manifests/init.pp
index 32cae42..980a77d 100644
--- a/modules/pdfrender/manifests/init.pp
+++ b/modules/pdfrender/manifests/init.pp
@@ -56,7 +56,7 @@
     scap::target { 'electron-render/deploy':
         deploy_user  => 'deploy-service',
         service_name => 'pdfrender',
-        before       => Base::Service_unit['pdfrender'],
+        before       => Systemd::Service['pdfrender'],
     }
 
     group { 'pdfrender':
@@ -71,7 +71,7 @@
         managehome => true,
         shell      => '/bin/bash',
         system     => true,
-        before     => Base::Service_unit['pdfrender'],
+        before     => Systemd::Service['pdfrender'],
     }
 
     file { $log_dir:
@@ -79,7 +79,7 @@
         owner  => 'pdfrender',
         group  => 'pdfrender',
         mode   => '0755',
-        before => Base::Service_unit['pdfrender'],
+        before => Systemd::Service['pdfrender'],
     }
 
     file { '/etc/firejail/pdfrender.profile':
@@ -88,7 +88,7 @@
         group  => 'root',
         mode   => '0444',
         source => 'puppet:///modules/pdfrender/firejail.profile',
-        before => Base::Service_unit['pdfrender'],
+        before => Systemd::Service['pdfrender'],
     }
 
     file { '/etc/xpra/xpra.conf':
@@ -97,7 +97,7 @@
         group  => 'root',
         mode   => '0444',
         source => 'puppet:///modules/pdfrender/xpra.conf',
-        before => Base::Service_unit['pdfrender'],
+        before => Systemd::Service['pdfrender'],
     }
 
     # Enable font hinting
@@ -123,7 +123,7 @@
         group  => 'pdfrender',
         mode   => '0444',
         source => 'puppet:///modules/pdfrender/fonts.conf',
-        before => Base::Service_unit['pdfrender'],
+        before => Systemd::Service['pdfrender'],
     }
     # end font hinting
 
@@ -131,7 +131,7 @@
         readable_by => 'all',
         base_dir    => $::service::configuration::log_dir,
         group       => 'root',
-        before      => Base::Service_unit['pdfrender'],
+        before      => Systemd::Service['pdfrender'],
     }
 
     $params = {
@@ -142,9 +142,10 @@
         enable => $running,
     }
 
-    base::service_unit { 'pdfrender':
+    systemd::service { 'pdfrender':
         ensure         => present,
-        systemd        => true,
+        restart        => true,
+        content        => systemd_template('pdfrender'),
         service_params => $params,
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/371619
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I297df2f3eb27a823c4afbe7ec84d6630484ef2f1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to