From f25d388f4bf43370de68111b2e6d38becef3c4ff Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 26 Feb 2014 00:19:47 +0000 Subject: [PATCH] Puppet the /etc/elasticsearch directory * modules/elasticsearch/manifests/init.pp: Brown bag fix... the package installation used to make this directory, but now we want to put files in it prior to package installation. Change-Id: Id3069999d59f965226bcae8f21ef7a93e4d44c72 --- modules/elasticsearch/manifests/init.pp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/elasticsearch/manifests/init.pp b/modules/elasticsearch/manifests/init.pp index 04c88b4f76..520517d474 100644 --- a/modules/elasticsearch/manifests/init.pp +++ b/modules/elasticsearch/manifests/init.pp @@ -70,6 +70,13 @@ class elasticsearch ( ] } + file { '/etc/elasticsearch': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + } + file { '/etc/elasticsearch/elasticsearch.yml': ensure => present, content => template('elasticsearch/elasticsearch.yml.erb'), @@ -77,6 +84,7 @@ class elasticsearch ( owner => 'root', group => 'root', mode => '0644', + require => File['/etc/elasticsearch'], } file { '/etc/elasticsearch/templates': @@ -84,6 +92,7 @@ class elasticsearch ( owner => 'root', group => 'root', mode => '0755', + require => File['/etc/elasticsearch'], } file { '/etc/elasticsearch/default-mapping.json': @@ -93,6 +102,7 @@ class elasticsearch ( owner => 'root', group => 'root', mode => '0644', + require => File['/etc/elasticsearch'], } file { '/etc/default/elasticsearch': @@ -106,8 +116,6 @@ class elasticsearch ( service { 'elasticsearch': ensure => running, - require => [ - Package['elasticsearch'], - ], + require => Package['elasticsearch'], } }