Skip to content

Commit

Permalink
Use suggestion for optional params
Browse files Browse the repository at this point in the history
A final note: ensure that every optional parameter is initialized with undef. Refer to this link for additional guidance: https://github.com/voxpupuli/puppet-lint-params_empty_string-check
  • Loading branch information
zipkid committed Dec 6, 2023
1 parent 27f649e commit 4828b6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 0 additions & 7 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ nexus::purge_installations: true
nexus::purge_default_repositories: false
nexus::user: nexus
nexus::work_dir: "%{lookup('nexus::install_root')}/sonatype-work/nexus3"

nexus::admin_username: null
nexus::admin_first_name: null
nexus::admin_last_name: null
nexus::admin_email_address: null
nexus::admin_roles: null
nexus::admin_password: null
12 changes: 6 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
Boolean $manage_work_dir,
Boolean $purge_installations,
Boolean $purge_default_repositories,
Optional[String[1]] $admin_username,
Optional[String[1]] $admin_first_name,
Optional[String[1]] $admin_last_name,
Optional[String[1]] $admin_email_address,
Optional[Array[String[1]]] $admin_roles,
Optional[Variant[String[1], Sensitive[String[1]]]] $admin_password,
Optional[String[1]] $admin_username = undef,
Optional[String[1]] $admin_first_name = undef,
Optional[String[1]] $admin_last_name = undef,
Optional[String[1]] $admin_email_address = undef,
Optional[Array[String[1]]] $admin_roles = undef,
Optional[Variant[String[1], Sensitive[String[1]]]] $admin_password = undef,
) {
include stdlib

Expand Down

0 comments on commit 4828b6b

Please sign in to comment.