Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@
$_agent_config = {
'api_key' => $api_key,
'dd_url' => $dd_url,
'hostname' => $host,
'cmd_port' => 5001,
'conf_path' => $datadog_agent::params::conf6_dir,
'enable_metadata_collection' => $collect_instance_metadata,
Expand Down
13 changes: 12 additions & 1 deletion spec/classes/datadog_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,18 @@
end
end

context 'with apm_extra_config' do
context 'with modified defaults' do
context 'hostname override' do
let(:params) {{
:host => 'my_custom_hostname',
}}
it { should contain_file('/etc/datadog-agent/datadog.yaml').with(
'content' => /^hostname: my_custom_hostname\n/,
)}
end
end

context 'with additional agents config' do
context 'with extra_options and APM enabled' do
let(:params) {{
:apm_enabled => true,
Expand Down