Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8415

Error is optional parameter is missing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: PUP 4.10.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Ubuntu 16.04

    • Template:
      PUP Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      I create a defined resource which has optional parameters. But if one of the parameters isn't specified I get the following error:

      Error while evaluating a Resource Statement, Profile::Mongodb::User[mongo_test_mongo_test_ro]:
      expects a value for parameter 'password_hash' at /etc/puppetlabs/code/environments/xxx/modules/profile/manifests/mongodb/database.pp:48 on node test.xxx.net
      

      The defined resource looks like follows:

      define profile::mongodb::user (
        String           $username,
        String           $database,
        Optional[String] $password,
        Optional[String] $password_hash,
        Array            $roles          = ['readWrite'],
      ) {}
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              WebComPas PU
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support