Skip to content

Commit 918f1c3

Browse files
committed
Test and fix manage_repo => false problems on apt distributions
1 parent 28d7c54 commit 918f1c3

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#### Fixes
44
* The Elasticsearch log directory is no longer recursively managed to avoid stomping on the user/mode settings that Elasticsearch prefers.
5+
* Package management on apt-based systems no longer encounters dependency errors when `manage_repo => false`.
56

67
#### Features
78

manifests/package.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
}
155155

156156
} else {
157-
if ($facts['os']['family'] == 'Debian') {
157+
if ($elasticsearch::manage_repo and $facts['os']['family'] == 'Debian') {
158158
Class['apt::update'] -> Package['elasticsearch']
159159
}
160160
}

spec/classes/000_elasticsearch_init_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,16 @@
236236

237237
it { should contain_class('elastic_stack::repo') }
238238
end
239+
240+
context 'When not managing the repository' do
241+
let(:params) do
242+
default_params.merge(
243+
:manage_repo => false
244+
)
245+
end
246+
247+
it { should compile.with_all_deps }
248+
end
239249
end
240250
end
241251

0 commit comments

Comments
 (0)