Skip to content

Commit 9d8fe95

Browse files
authored
Merge pull request #673 from mhashizume/PA-5820/main/data-type-corrections
(PA-5820) Correct parameter types
2 parents 3663482 + 1bd111b commit 9d8fe95

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

REFERENCE.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,15 @@ The following parameters are available in the `puppet_agent::install` class:
389389

390390
##### <a name="-puppet_agent--install--package_version"></a>`package_version`
391391

392-
Data type: `Optional[String]`
392+
Data type: `String`
393393

394394
The puppet-agent version to install.
395395

396-
Default value: `undef`
396+
Default value: `'present'`
397397

398398
##### <a name="-puppet_agent--install--install_dir"></a>`install_dir`
399399

400-
Data type: `Optional[[Stdlib::Absolutepath]]`
400+
Data type: `Optional[Stdlib::Absolutepath]`
401401

402402
The directory the puppet agent should be installed to. This is only applicable for
403403
windows operating systems.
@@ -406,7 +406,7 @@ Default value: `undef`
406406

407407
##### <a name="-puppet_agent--install--install_options"></a>`install_options`
408408

409-
Data type: `Optional[Array]`
409+
Data type: `Array[Variant[String, Hash]]`
410410

411411
An array of additional options to pass when installing puppet-agent. Each option in
412412
the array can either be a string or a hash. Each option will automatically be quoted
@@ -416,7 +416,7 @@ the installation command, forward slashes won't be automatically converted like
416416
are in `file` resources.) Note also that backslashes in double-quoted strings _must_
417417
be escaped and backslashes in single-quoted strings _can_ be escaped.
418418

419-
Default value: `undef`
419+
Default value: `[]`
420420

421421
### <a name="puppet_agent--install--darwin"></a>`puppet_agent::install::darwin`
422422

@@ -437,7 +437,7 @@ The puppet-agent version to install.
437437

438438
##### <a name="-puppet_agent--install--darwin--install_options"></a>`install_options`
439439

440-
Data type: `Optional[Array]`
440+
Data type: `Array[Variant[String, Hash]]`
441441

442442
An array of additional options to pass when installing puppet-agent. Each option in
443443
the array can either be a string or a hash. Each option will automatically be quoted
@@ -447,7 +447,7 @@ the installation command, forward slashes won't be automatically converted like
447447
are in `file` resources.) Note also that backslashes in double-quoted strings _must_
448448
be escaped and backslashes in single-quoted strings _can_ be escaped.
449449

450-
Default value: `undef`
450+
Default value: `[]`
451451

452452
### <a name="puppet_agent--install--solaris"></a>`puppet_agent::install::solaris`
453453

@@ -468,7 +468,7 @@ The puppet-agent version to install.
468468

469469
##### <a name="-puppet_agent--install--solaris--install_options"></a>`install_options`
470470

471-
Data type: `Optional[Array]`
471+
Data type: `Array[Variant[String, Hash]]`
472472

473473
An array of additional options to pass when installing puppet-agent. Each option in
474474
the array can either be a string or a hash. Each option will automatically be quoted
@@ -478,7 +478,7 @@ the installation command, forward slashes won't be automatically converted like
478478
are in `file` resources.) Note also that backslashes in double-quoted strings _must_
479479
be escaped and backslashes in single-quoted strings _can_ be escaped.
480480

481-
Default value: `undef`
481+
Default value: `[]`
482482

483483
### <a name="puppet_agent--install--suse"></a>`puppet_agent::install::suse`
484484

@@ -499,7 +499,7 @@ The puppet-agent version to install.
499499

500500
##### <a name="-puppet_agent--install--suse--install_options"></a>`install_options`
501501

502-
Data type: `Optional[Array]`
502+
Data type: `Array[Variant[String, Hash]]`
503503

504504
An array of additional options to pass when installing puppet-agent.
505505
Each option in the array can either be a string or a hash.
@@ -510,7 +510,7 @@ command, forward slashes won't be automatically converted like they are in
510510
`file` resources.) Note also that backslashes in double-quoted strings
511511
_must_ be escaped and backslashes in single-quoted strings _can_ be escaped.
512512

513-
Default value: `undef`
513+
Default value: `[]`
514514

515515
### <a name="puppet_agent--install--windows"></a>`puppet_agent::install::windows`
516516

@@ -525,7 +525,7 @@ The following parameters are available in the `puppet_agent::install::windows` c
525525

526526
##### <a name="-puppet_agent--install--windows--install_options"></a>`install_options`
527527

528-
Data type: `Array`
528+
Data type: `Array[Variant[String, Hash]]`
529529

530530
An array of additional options to pass when installing puppet-agent. Each option in
531531
the array can either be a string or a hash. Each option will automatically be quoted

manifests/install.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# are in `file` resources.) Note also that backslashes in double-quoted strings _must_
1515
# be escaped and backslashes in single-quoted strings _can_ be escaped.
1616
class puppet_agent::install (
17-
Optional[String] $package_version = undef,
18-
Optional[[Stdlib::Absolutepath]] $install_dir = undef,
19-
Optional[Array] $install_options = undef,
17+
String $package_version = 'present',
18+
Optional[Stdlib::Absolutepath] $install_dir = undef,
19+
Array[Variant[String, Hash]] $install_options = [],
2020
) {
2121
assert_private()
2222

manifests/install/darwin.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# are in `file` resources.) Note also that backslashes in double-quoted strings _must_
1313
# be escaped and backslashes in single-quoted strings _can_ be escaped.
1414
class puppet_agent::install::darwin (
15-
String $package_version,
16-
Optional[Array] $install_options = undef,
15+
String $package_version,
16+
Array[Variant[String, Hash]] $install_options = [],
1717
) {
1818
assert_private()
1919
$install_script = 'osx_install.sh.erb'

manifests/install/solaris.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# are in `file` resources.) Note also that backslashes in double-quoted strings _must_
1313
# be escaped and backslashes in single-quoted strings _can_ be escaped.
1414
class puppet_agent::install::solaris (
15-
String $package_version,
16-
Optional[Array] $install_options = undef,
15+
String $package_version,
16+
Array[Variant[String, Hash]] $install_options = [],
1717
) {
1818
assert_private()
1919
if $facts['os']['release']['major'] == '10' {

manifests/install/suse.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# `file` resources.) Note also that backslashes in double-quoted strings
1414
# _must_ be escaped and backslashes in single-quoted strings _can_ be escaped.
1515
class puppet_agent::install::suse (
16-
String $package_version,
17-
Optional[Array] $install_options = undef,
16+
String $package_version,
17+
Array[Variant[String, Hash]] $install_options = [],
1818
) {
1919
assert_private()
2020

manifests/install/windows.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# windows operating systems.
1515
class puppet_agent::install::windows (
1616
Optional $install_dir = undef,
17-
Array $install_options = [],
17+
Array[Variant[String, Hash]] $install_options = [],
1818
) {
1919
assert_private()
2020

0 commit comments

Comments
 (0)