diff --git a/manifests/config.pp b/manifests/config.pp index dee8888..7c9eb27 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -23,13 +23,13 @@ file { $configfile: content => template('elasticsearch/elasticsearch.yml.erb'), require => File[$configdir], - notify => Service['com.boxen.elasticsearch'], + notify => Service['dev.elasticsearch'], } - file { '/Library/LaunchDaemons/com.boxen.elasticsearch.plist': - content => template('elasticsearch/com.boxen.elasticsearch.plist.erb'), + file { '/Library/LaunchDaemons/dev.elasticsearch.plist': + content => template('elasticsearch/dev.elasticsearch.plist.erb'), group => 'wheel', - notify => Service['com.boxen.elasticsearch'], + notify => Service['dev.elasticsearch'], owner => 'root' } } diff --git a/manifests/init.pp b/manifests/init.pp index 7eb81a2..02fd2d2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,14 +9,18 @@ package { 'boxen/brews/elasticsearch': ensure => '0.19.9-boxen1', - notify => Service['com.boxen.elasticsearch'] + notify => Service['dev.elasticsearch'] } - service { 'com.boxen.elasticsearch': + service { 'dev.elasticsearch': ensure => running, require => Package['boxen/brews/elasticsearch'] } + service { 'com.boxen.elasticsearch': # replaced by dev.elasticsearch + before => Service['dev.elasticsearch'], + enable => false + } file { "${boxen::config::envdir}/elasticsearch.sh": content => template('elasticsearch/env.sh.erb'), diff --git a/spec/classes/elasticsearch_config_spec.rb b/spec/classes/elasticsearch_config_spec.rb index 48540ee..eadcda1 100644 --- a/spec/classes/elasticsearch_config_spec.rb +++ b/spec/classes/elasticsearch_config_spec.rb @@ -24,15 +24,15 @@ should contain_file("#{configdir}/elasticsearch.yml").with({ :content => File.read('spec/fixtures/elasticsearch.yml'), :require => "File[#{configdir}]", - :notify => 'Service[com.boxen.elasticsearch]', + :notify => 'Service[dev.elasticsearch]', }) end it do - should contain_file('/Library/LaunchDaemons/com.boxen.elasticsearch.plist').with({ - :content => File.read('spec/fixtures/com.boxen.elasticsearch.plist'), + should contain_file('/Library/LaunchDaemons/dev.elasticsearch.plist').with({ + :content => File.read('spec/fixtures/dev.elasticsearch.plist'), :group => 'wheel', - :notify => 'Service[com.boxen.elasticsearch]', + :notify => 'Service[dev.elasticsearch]', :owner => 'root', }) end diff --git a/spec/classes/elasticsearch_spec.rb b/spec/classes/elasticsearch_spec.rb index 00cd760..f91daa2 100644 --- a/spec/classes/elasticsearch_spec.rb +++ b/spec/classes/elasticsearch_spec.rb @@ -13,12 +13,12 @@ it do should contain_package('boxen/brews/elasticsearch').with({ :ensure => '0.19.9-boxen1', - :notify => 'Service[com.boxen.elasticsearch]', + :notify => 'Service[dev.elasticsearch]', }) end it do - should contain_service('com.boxen.elasticsearch').with({ + should contain_service('dev.elasticsearch').with({ :ensure => 'running', :require => 'Package[boxen/brews/elasticsearch]', }) diff --git a/spec/fixtures/com.boxen.elasticsearch.plist b/spec/fixtures/dev.elasticsearch.plist similarity index 95% rename from spec/fixtures/com.boxen.elasticsearch.plist rename to spec/fixtures/dev.elasticsearch.plist index c9e3d42..f9f689e 100644 --- a/spec/fixtures/com.boxen.elasticsearch.plist +++ b/spec/fixtures/dev.elasticsearch.plist @@ -3,7 +3,7 @@ Label - com.boxen.elasticsearch + dev.elasticsearch Boxen diff --git a/templates/com.boxen.elasticsearch.plist.erb b/templates/dev.elasticsearch.plist.erb similarity index 96% rename from templates/com.boxen.elasticsearch.plist.erb rename to templates/dev.elasticsearch.plist.erb index 65e3d45..007cba7 100644 --- a/templates/com.boxen.elasticsearch.plist.erb +++ b/templates/dev.elasticsearch.plist.erb @@ -3,7 +3,7 @@ Label - com.boxen.elasticsearch + dev.elasticsearch Boxen