Skip to content

Commit 7f39240

Browse files
alexberryAlex Berry
andauthored
Fix passing tags to msiexec (DataDog#661)
* Testing an inline transform to fix tag arrays using msiexec * Converting the array to a quoted string separated by commas, else msiexec opens a gui error message and hangs the puppet run when the $tags array has more than one member. * Puppet lint fixes Co-authored-by: Alex Berry <alexb@directferries.com>
1 parent 42d7368 commit 7f39240

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

manifests/windows.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
String $api_key = $datadog_agent::api_key,
1212
String $hostname = $datadog_agent::host,
1313
Array $tags = $datadog_agent::tags,
14+
String $tags_join = join($tags,','),
15+
String $tags_quote_wrap = "\"${tags_join}\"",
1416
Enum['present', 'absent'] $ensure = 'present',
1517
) inherits datadog_agent::params {
1618

@@ -67,7 +69,7 @@
6769
ensure => $ensure_version,
6870
provider => 'windows',
6971
source => $msi_full_path,
70-
install_options => ['/norestart', {'APIKEY' => $api_key, 'HOSTNAME' => $hostname, 'TAGS' => $tags}]
72+
install_options => ['/norestart', {'APIKEY' => $api_key, 'HOSTNAME' => $hostname, 'TAGS' => $tags_quote_wrap}]
7173
}
7274

7375
} else {

0 commit comments

Comments
 (0)