Skip to content

Commit c8863df

Browse files
committed
Merge pull request #67 from martinb3/master
Disable backups when cloud credentials missing
2 parents 65b89b3 + 13e717d commit c8863df

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 3.1.4
2+
3+
- Don't just raise an error, actually disable backups when cloud account credentials aren't present
4+
15
# 3.1.3
26

37
- Clean up attributes so they don't error out when no cloud account is found

metadata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
license 'Apache 2.0'
66
description 'Installs/Configures elkstack'
77
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
8-
version '3.1.3'
8+
version '3.1.4'
99

1010
depends 'apt'
1111
depends 'yum'

recipes/elasticsearch.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@
3131
action :start
3232
end
3333

34-
should_backup = node.deep_fetch('elkstack', 'config', 'backups', 'enabled')
35-
if !should_backup.nil? && should_backup
34+
# was the module enabled? (default value for this ensures cloud credentials are set too)
35+
rackspace_elasticsearch_mod_enabled = node.deep_fetch('elasticsearch', 'custom_config', 'rackspace.enabled')
36+
37+
# were backups turned on? they are by default, but check
38+
backups_enabled_flag = node.deep_fetch('elkstack', 'config', 'backups', 'enabled')
39+
40+
if rackspace_elasticsearch_mod_enabled && backups_enabled_flag
3641
include_recipe 'elkstack::elasticsearch_backup'
3742
end
3843

0 commit comments

Comments
 (0)