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

dsc_lite : MSFT_Credential issue for password-only PSCredential

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • dsc_lite
    • None
    •  

       

    • 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.
    • Windows
    • 1
    • Windows 2018-05-16
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support