Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force_default oneagent_download_dir does not correctly set oneagent_installer_path #13

Open
fgarcia-cnb opened this issue Jul 21, 2022 · 0 comments

Comments

@fgarcia-cnb
Copy link

force_default['dynatraceoneagent']['oneagent_download_dir'] = 'C:\\install\\Dynatrace-OneAgent-Windows-latest'

this correctly sets oneagent_download_dir, but the dynamic creation of oneagent_installer_path still uses temp as defined in the source code:

default['dynatraceoneagent']['oneagent_download_dir'] = "#{ENV['TEMP']}"
default['dynatraceoneagent']['oneagent_installer_filename'] = "Dynatrace-OneAgent-Windows-#{node['dynatraceoneagent']['oneagent_version']}.exe"
default['dynatraceoneagent']['oneagent_installer_path'] = "#{node['dynatraceoneagent']['oneagent_download_dir']}\\#{node['dynatraceoneagent']['oneagent_installer_filename']}"

so instead of getting

oneagent_installer_path = "C:\install\Dynatrace-OneAgent-Windows-latest\Dynatrace-OneAgent-Windows-latest.exe"

we get

oneagent_installer_path = "%TEMP%\Dynatrace-OneAgent-Windows-latest.exe"

the workaround is to also define the override for oneagent_installer_path:

force_default['dynatraceoneagent']['oneagent_download_dir'] = 'C:\\install\\Dynatrace-OneAgent-Windows-latest'
force_default['dynatraceoneagent']['oneagent_installer_path'] = "#{node['dynatraceoneagent']['oneagent_download_dir']}\\#{node['dynatraceoneagent']['oneagent_installer_filename']}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant