Manybubbles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84986


Change subject: Install config files before elasticsearch.
......................................................................

Install config files before elasticsearch.

This makes sure all of our config updates are picked up the first time
elasticserach starts.  This is really important now that elasticsearch
doesn't subscribe to its config files.

Change-Id: Iacc07b52cd8bb48c1324c2eceefc3c5ced6256c5
---
M modules/elasticsearch/manifests/init.pp
1 file changed, 19 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/84986/1

diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index b4f4664..3a54359 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -31,27 +31,41 @@
     java { 'java-default': }
     package { 'elasticsearch':
         ensure  => present,
-        require => Java['java-default']
+        require => [
+            Java['java-default'],
+            File['/etc/elasticsearch/elasticsearch.yml'],
+            File['/etc/elasticsearch/logging.yml'],
+            File['/etc/default/elasticsearch'],
+        ]
     }
 
     # Configure
+    file { '/etc/elasticsearch':
+        ensure  => directory
+    }
     file { '/etc/elasticsearch/elasticsearch.yml':
-        ensure  => present,
+        ensure  => file,
+        owner   => root,
+        group   => root,
         content => template('elasticsearch/elasticsearch.yml.erb'),
         mode    => '0444',
-        require => Package['elasticsearch'],
+        require => File['/etc/elasticsearch'],
     }
     file { '/etc/elasticsearch/logging.yml':
         ensure  => file,
+        owner   => root,
+        group   => root,
         content => template('elasticsearch/logging.yml.erb'),
         mode    => '0444',
-        require => Package['elasticsearch'],
+        require => File['/etc/elasticsearch'],
     }
     file { '/etc/default/elasticsearch':
         ensure  => file,
+        owner   => root,
+        group   => root,
         content => template('elasticsearch/elasticsearch.erb'),
         mode    => '0444',
-        require => Package['elasticsearch'],
+        require => File['/etc/elasticsearch'],
     }
     file { '/etc/logrotate.d/elasticsearch':
         ensure  => file,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacc07b52cd8bb48c1324c2eceefc3c5ced6256c5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Manybubbles <never...@wikimedia.org>

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

Reply via email to