Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399359 )

Change subject: haproxy: Update haproxy systemd.unit to that of stretch
......................................................................

haproxy: Update haproxy systemd.unit to that of stretch

Bug: T183249
Change-Id: Ib129b934b0d2404bfcb71477c9ee77cd9be94314
---
D modules/haproxy/files/haproxy.service
M modules/haproxy/manifests/init.pp
A modules/haproxy/templates/haproxy.service.erb
3 files changed, 21 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/399359/1

diff --git a/modules/haproxy/files/haproxy.service 
b/modules/haproxy/files/haproxy.service
deleted file mode 100644
index 459bd5e..0000000
--- a/modules/haproxy/files/haproxy.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=HAProxy Load Balancer
-Documentation=man:haproxy(1)
-Documentation=file:/usr/share/doc/haproxy/configuration.txt.gz
-After=network.target syslog.service
-Wants=syslog.service
-
-[Service]
-Environment=CONFIG=/etc/haproxy/haproxy.cfg
-EnvironmentFile=-/etc/default/haproxy
-ExecStartPre=/usr/local/bin/generate_haproxy_default.sh
-ExecStartPre=/usr/sbin/haproxy -f ${CONFIG} -c -q
-ExecStart=/usr/sbin/haproxy-systemd-wrapper -f ${CONFIG} -p /run/haproxy.pid 
$EXTRAOPTS
-ExecReload=/usr/sbin/haproxy -c -f ${CONFIG}
-ExecReload=/bin/kill -USR2 $MAINPID
-KillMode=mixed
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
diff --git a/modules/haproxy/manifests/init.pp 
b/modules/haproxy/manifests/init.pp
index 598c75f..e06fe0e 100644
--- a/modules/haproxy/manifests/init.pp
+++ b/modules/haproxy/manifests/init.pp
@@ -61,7 +61,7 @@
             mode    => '0644',
             owner   => 'root',
             group   => 'root',
-            source  => 'puppet:///modules/haproxy/haproxy.service',
+            content => template('/haproxy/haproxy.service.erb'),
             require => File['/usr/local/bin/generate_haproxy_default.sh'],
             notify  => Exec['/bin/systemctl daemon-reload'],
         }
diff --git a/modules/haproxy/templates/haproxy.service.erb 
b/modules/haproxy/templates/haproxy.service.erb
new file mode 100644
index 0000000..f8cd99e
--- /dev/null
+++ b/modules/haproxy/templates/haproxy.service.erb
@@ -0,0 +1,20 @@
+[Unit]
+Description=HAProxy Load Balancer
+Documentation=man:haproxy(1)
+Documentation=file:/usr/share/doc/haproxy/configuration.txt.gz
+After=network.target syslog.service
+Wants=syslog.service
+
+[Service]
+Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=<%=@pid%>"
+EnvironmentFile=-/etc/default/haproxy
+ExecStartPre=/usr/local/bin/generate_haproxy_default.sh
+ExecStartPre=/usr/sbin/haproxy -f ${CONFIG} -c -q $EXTRAOPTS
+ExecStart=/usr/sbin/haproxy-systemd-wrapper -f ${CONFIG} -p $PIDFILE $EXTRAOPTS
+ExecReload=/usr/sbin/haproxy -f ${CONFIG} -c -q $EXTRAOPTS
+ExecReload=/bin/kill -USR2 $MAINPID
+KillMode=mixed
+Restart=always
+
+[Install]
+WantedBy=multi-user.target

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib129b934b0d2404bfcb71477c9ee77cd9be94314
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to