Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339763 )

Change subject: Phabricator: Migrate to base::service_unit for ssh-phab
......................................................................


Phabricator: Migrate to base::service_unit for ssh-phab

This is part 2 of the migration.

Bug: T137928
Bug: T158434
Change-Id: Ia7a6200fab11c4bad51ee0e0163fad17f83fa5a6
---
M modules/phabricator/manifests/vcs.pp
1 file changed, 4 insertions(+), 20 deletions(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/phabricator/manifests/vcs.pp 
b/modules/phabricator/manifests/vcs.pp
index 64cfdd4..76c1510 100644
--- a/modules/phabricator/manifests/vcs.pp
+++ b/modules/phabricator/manifests/vcs.pp
@@ -92,26 +92,10 @@
         require    => File['/usr/local/bin/git-http-backend'],
     }
 
-    if $::initsystem == 'upstart' {
-        $init_file = '/etc/init/ssh-phab.conf'
-        $init_template = 'phabricator/initscripts/ssh-phab.upstart.erb'
-    } else {
-        $init_file = '/etc/systemd/system/ssh-phab.service'
-        $init_template = 'phabricator/initscripts/ssh-phab.systemd.erb'
-    }
-
-    file { $init_file:
-        content => template($init_template),
-        mode    => '0644',
-        owner   => 'root',
-        group   => 'root',
+    base::service_unit { 'ssh-phab':
+        ensure  => 'present',
+        systemd => true,
+        upstart => true,
         require => Package['openssh-server'],
-    }
-
-    service { 'ssh-phab':
-        ensure     => running,
-        provider   => $::initsystem,
-        hasrestart => true,
-        require    => File[$init_file],
     }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7a6200fab11c4bad51ee0e0163fad17f83fa5a6
Gerrit-PatchSet: 22
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to