Alexandros Kosiaris has submitted this change and it was merged.
Change subject: txstatsd: ensure $init_file attributes
......................................................................
txstatsd: ensure $init_file attributes
Puppet is especially flaky when it comes to how it populates file
resources with no owner, group and mode attributes on target systems.
Group both systemd and upstart into a single file resource to DRY and
specify them
Change-Id: I4cc81b2c2f1853867f8c0ae67d33590a0b55c2f2
---
M modules/txstatsd/manifests/init.pp
1 file changed, 10 insertions(+), 6 deletions(-)
Approvals:
Alexandros Kosiaris: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/txstatsd/manifests/init.pp
b/modules/txstatsd/manifests/init.pp
index 125d175..25dc10c 100644
--- a/modules/txstatsd/manifests/init.pp
+++ b/modules/txstatsd/manifests/init.pp
@@ -55,21 +55,25 @@
case $::initsystem {
'systemd': {
$init_file = '/etc/systemd/system/txstatsd.service'
- file { $init_file:
- source => 'puppet:///modules/txstatsd/txstatsd.service'
- }
+ $init_source = 'puppet:///modules/txstatsd/txstatsd.service'
}
'upstart': {
$init_file = '/etc/init/txstatsd.conf'
- file { $init_file:
- source => 'puppet:///modules/txstatsd/txstatsd.conf',
- }
+ $init_source = 'puppet:///modules/txstatsd/txstatsd.conf'
}
default: {
fail('The txstatsd pupppet module does not like your init system!')
}
}
+ file { $init_file:
+ ensure => 'present',
+ owner => 'root',
+ group => 'root',
+ mode => '0444',
+ source => $init_source,
+ }
+
service { 'txstatsd':
ensure => running,
provider => $::initsystem,
--
To view, visit https://gerrit.wikimedia.org/r/185424
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4cc81b2c2f1853867f8c0ae67d33590a0b55c2f2
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits