Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-6992

dsc_lite : MSFT_Credential issue for password-only PSCredential

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: dsc_lite
    • Labels:
      None
    • Environment:

       

       

    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      Add to README how to specify credentials without a user name.

      Include a positive example in the doc.

      Testing: run the positive example and see that it works.

      Show
      Add to README how to specify credentials without a user name. Include a positive example in the doc. Testing: run the positive example and see that it works.
    • Epic Link:
    • Team:
      Windows
    • Story Points:
      1
    • Sprint:
      Windows 2018-05-16
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 0.2.0
      Puppet Version:5.3.3
      OS Name/Version: Windows Server 2016

      Describe your issue in as much detail as possible...

      Desired Behavior:

      I'm having issue using the spfarm dsc from the sharepointdsc (release 2.2) module using dsc_lite.

      This resource requires passphrase only, essentially a password only MSFT_Credential. (It's expecting a PSCredential.)

       

      Actual Behavior:

      Using this manifest:

      // cdsc{ 'spfarm':
        dsc_resource_name       => 'SPFarm',
        dsc_resource_module     => 'SharePointDsc',
        dsc_resource_properties => {
          'ensure'                   => present,
          'serverrole'               => $sprole,
          'farmconfigdatabasename'   => hiera('sharepoint::configdb'),
          'databaseserver'           => hiera('sharepoint::sqlserver'),
          'farmaccount'              => {
            'dsc_type'       => 'MSFT_Credential',
            'dsc_properties' => {
              'user'     => $farmaccount,
              'password' => $farmaccountp,
            }
          },
          'passphrase'               => {
            'dsc_type'       => 'MSFT_Credential',
            'dsc_properties' => {
              'user'     => undef,
              'password' => hiera('sharepoint::passphrase'),
            }
          },
          'admincontentdatabasename' => hiera('sharepoint::admincontentdb'),
          'runcentraladmin'          => $centraladmin,
          'psdscrunascredential'     => {
            'dsc_type'       => 'MSFT_Credential',
            'dsc_properties' => {
              'user'     => hiera('sharepoint::setupaccount'),
              'password' => hiera('sharepoint::setupaccountp'),
            }
          }
        },
      }
      

      I get the following error:

      Error: /Stage[main]/Profiles::Sharepoint/Dsc[spfarm]: Could not evaluate: unsupported type NilClass of value ''

       

      I have also tried it with '', and not specifying the user key. Neither of those work either.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.lombardi Michael Lombardi
              Reporter:
              AndrewB Andrew Ball
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support