|
238 | 238 | # To use NPM features it is necessary to enable install through this flag, as well as |
239 | 239 | # configuring NPM through the datadog::system_probe class. |
240 | 240 | # Boolean. Default: false |
| 241 | +# $windows_ddagentuser_name |
| 242 | +# (Windows only) The name of Windows user to use, in the format `<domain>\<user>`. |
| 243 | +# |
| 244 | +# $windows_ddagentuser_password |
| 245 | +# (Windows only) The password used to register the service`. |
241 | 246 | # |
242 | 247 | # Sample Usage: |
243 | 248 | # |
|
333 | 338 | Optional[Integer] $agent_major_version = undef, |
334 | 339 | Optional[String] $conf_dir = undef, |
335 | 340 | Boolean $conf_dir_purge = $datadog_agent::params::conf_dir_purge, |
336 | | - $dd_user = $datadog_agent::params::dd_user, |
337 | 341 | $dd_group = $datadog_agent::params::dd_group, |
338 | 342 | $dd_groups = $datadog_agent::params::dd_groups, |
339 | 343 | Boolean $apm_enabled = $datadog_agent::params::apm_default_enabled, |
|
361 | 365 | Optional[String] $service_provider = undef, |
362 | 366 | Optional[String] $agent_version = $datadog_agent::params::agent_version, |
363 | 367 | Boolean $windows_npm_install = false, |
| 368 | + Optional[String] $windows_ddagentuser_name = undef, |
| 369 | + Optional[String] $windows_ddagentuser_password = undef, |
364 | 370 | ) inherits datadog_agent::params { |
365 | 371 |
|
366 | 372 | #In this regex, version '1:6.15.0~rc.1-1' would match as $1='1:', $2='6', $3='15', $4='0', $5='~rc.1', $6='1' |
|
379 | 385 | fail("agent_major_version must be either 5, 6 or 7, not ${_agent_major_version}") |
380 | 386 | } |
381 | 387 |
|
| 388 | + if ($::operatingsystem == 'Windows' and $windows_ddagentuser_name != undef) { |
| 389 | + $dd_user = $windows_ddagentuser_name |
| 390 | + } else { |
| 391 | + $dd_user = $datadog_agent::params::dd_user |
| 392 | + } |
| 393 | + |
382 | 394 | # Allow ports to be passed as integers or strings. |
383 | 395 | # lint:ignore:only_variable_string |
384 | 396 | $_dogstatsd_port = "${dogstatsd_port}" |
|
461 | 473 | } |
462 | 474 | 'Windows' : { |
463 | 475 | class { 'datadog_agent::windows' : |
464 | | - agent_major_version => $_agent_major_version, |
465 | | - agent_repo_uri => $agent_repo_uri, |
466 | | - agent_version => $agent_version, |
467 | | - msi_location => $win_msi_location, |
468 | | - api_key => $api_key, |
469 | | - hostname => $host, |
470 | | - tags => $local_tags, |
471 | | - ensure => $win_ensure, |
472 | | - npm_install => $windows_npm_install, |
| 476 | + agent_major_version => $_agent_major_version, |
| 477 | + agent_repo_uri => $agent_repo_uri, |
| 478 | + agent_version => $agent_version, |
| 479 | + msi_location => $win_msi_location, |
| 480 | + api_key => $api_key, |
| 481 | + hostname => $host, |
| 482 | + tags => $local_tags, |
| 483 | + ensure => $win_ensure, |
| 484 | + npm_install => $windows_npm_install, |
| 485 | + ddagentuser_name => $windows_ddagentuser_name, |
| 486 | + ddagentuser_password => $windows_ddagentuser_password, |
473 | 487 | } |
474 | 488 | if ($win_ensure == absent) { |
475 | 489 | return() #Config files will remain unchanged on uninstall |
|
761 | 775 |
|
762 | 776 | if ($::operatingsystem == 'Windows') { |
763 | 777 |
|
| 778 | + |
764 | 779 | file { 'C:/ProgramData/Datadog': |
765 | 780 | ensure => directory |
766 | 781 | } |
|
0 commit comments