Alexandros Kosiaris has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/374822 )
Change subject: mask file should be in /etc directory
......................................................................
mask file should be in /etc directory
This is a followup fix for I09ba869f9a914c76c161ba7d125b6afb5e0e6b91.
Make it so that the mask file is in /etc and not /lib. This allows
manually unmasking with systemctl mask/unmask and still populate
correctly the service file
Bug: T167104
Change-Id: I4601f2766aa0d6d0b3615ebd5cd5e8ea4068363f
---
M modules/base/manifests/service_unit.pp
1 file changed, 10 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/22/374822/1
diff --git a/modules/base/manifests/service_unit.pp
b/modules/base/manifests/service_unit.pp
index 4cb8292..ad3ec34c 100644
--- a/modules/base/manifests/service_unit.pp
+++ b/modules/base/manifests/service_unit.pp
@@ -108,6 +108,7 @@
'upstart' => "/etc/init/${name}.conf",
default => "/etc/init.d/${name}"
}
+ $systemd_mask_path = "/etc/systemd/system/${name}.service"
# systemd complains if unit files are executable
if $initscript == 'systemd' or $initscript == 'systemd_override' {
@@ -126,20 +127,20 @@
}
}
+ file { $path:
+ ensure => $ensure,
+ content => $content,
+ mode => $i_mode,
+ owner => 'root',
+ group => 'root',
+ }
+
if $initscript == 'systemd' and $mask {
- file { $path:
+ file { $systemd_mask_path:
ensure => 'link',
target => '/dev/null',
owner => 'root',
group => 'root',
- }
- } else {
- file { $path:
- ensure => $ensure,
- content => $content,
- mode => $i_mode,
- owner => 'root',
- group => 'root',
}
}
--
To view, visit https://gerrit.wikimedia.org/r/374822
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4601f2766aa0d6d0b3615ebd5cd5e8ea4068363f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits