Skip to content

(PA-5820) Correct parameter types #673

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

Merged
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
24 changes: 12 additions & 12 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,15 @@ The following parameters are available in the `puppet_agent::install` class:

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

Data type: `Optional[String]`
Data type: `String`

The puppet-agent version to install.

Default value: `undef`
Default value: `'present'`

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

Data type: `Optional[[Stdlib::Absolutepath]]`
Data type: `Optional[Stdlib::Absolutepath]`

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

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

Data type: `Optional[Array]`
Data type: `Array[Variant[String, Hash]]`

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

Default value: `undef`
Default value: `[]`

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

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

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

Data type: `Optional[Array]`
Data type: `Array[Variant[String, Hash]]`

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

Default value: `undef`
Default value: `[]`

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

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

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

Data type: `Optional[Array]`
Data type: `Array[Variant[String, Hash]]`

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

Default value: `undef`
Default value: `[]`

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

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

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

Data type: `Optional[Array]`
Data type: `Array[Variant[String, Hash]]`

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

Default value: `undef`
Default value: `[]`

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

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

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

Data type: `Array`
Data type: `Array[Variant[String, Hash]]`

An array of additional options to pass when installing puppet-agent. Each option in
the array can either be a string or a hash. Each option will automatically be quoted
Expand Down
6 changes: 3 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# are in `file` resources.) Note also that backslashes in double-quoted strings _must_
# be escaped and backslashes in single-quoted strings _can_ be escaped.
class puppet_agent::install (
Optional[String] $package_version = undef,
Optional[[Stdlib::Absolutepath]] $install_dir = undef,
Optional[Array] $install_options = undef,
String $package_version = 'present',
Optional[Stdlib::Absolutepath] $install_dir = undef,
Array[Variant[String, Hash]] $install_options = [],
) {
assert_private()

Expand Down
4 changes: 2 additions & 2 deletions manifests/install/darwin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# are in `file` resources.) Note also that backslashes in double-quoted strings _must_
# be escaped and backslashes in single-quoted strings _can_ be escaped.
class puppet_agent::install::darwin (
String $package_version,
Optional[Array] $install_options = undef,
String $package_version,
Array[Variant[String, Hash]] $install_options = [],
) {
assert_private()
$install_script = 'osx_install.sh.erb'
Expand Down
4 changes: 2 additions & 2 deletions manifests/install/solaris.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# are in `file` resources.) Note also that backslashes in double-quoted strings _must_
# be escaped and backslashes in single-quoted strings _can_ be escaped.
class puppet_agent::install::solaris (
String $package_version,
Optional[Array] $install_options = undef,
String $package_version,
Array[Variant[String, Hash]] $install_options = [],
) {
assert_private()
if $facts['os']['release']['major'] == '10' {
Expand Down
4 changes: 2 additions & 2 deletions manifests/install/suse.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# `file` resources.) Note also that backslashes in double-quoted strings
# _must_ be escaped and backslashes in single-quoted strings _can_ be escaped.
class puppet_agent::install::suse (
String $package_version,
Optional[Array] $install_options = undef,
String $package_version,
Array[Variant[String, Hash]] $install_options = [],
) {
assert_private()

Expand Down
2 changes: 1 addition & 1 deletion manifests/install/windows.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# windows operating systems.
class puppet_agent::install::windows (
Optional $install_dir = undef,
Array $install_options = [],
Array[Variant[String, Hash]] $install_options = [],
) {
assert_private()

Expand Down