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

dsc_lite : DSC_Lite Module Doesn't Handle DateTime Property Values

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Won't Fix
    • None
    • None
    • dsc_lite
    • Needs Assessment
    • 41960
    • 1
    • Needs Assessment

    Description

      When implementing a DSC resource using dsc_lite module, if a DSC property uses the datetime data type, the resource fails with the below error:

      Could not evaluate: Convert property 'starttime' value from type 'STRING' to type 'DATETIME' failed
      At line:24, char:2
      Buffer:
      2020-01-01T00:00:00";
      };^
      insta 

      Using the below puppet resource:

      dsc { 'Powershell Watchdog':
      resource_name => 'ScheduledTask',
      module => 'ComputerManagementDSC',
      properties => {
      #ensure removed due to Puppet lint issue
      enable => true,
      taskname => 'Powershell Watchdog',
      description => 'Managed by Puppet, terminates any large, long running Powershell process',
      actionexecutable => "${facts['os']['windows']['system32']}\\WindowsPowerShell\\v1.0\\powershell.exe",
      actionarguments => "-File \"${script_path}\"",
      scheduletype => 'Once',
      repeatinterval => '00:30:00',
      starttime => '2020-01-01T00:00:00',
      repetitionduration => 'Indefinitely',
      startwhenavailable => true,
      executeascredential => {
      'dsc_type' => 'MSFT_Credential',
      'dsc_properties' => {
      'user' => $real_task_user,
      'password' => $sensitive_task_password,
      },
      },
      } 

       

      Using modules:
      puppetlabs-pwshlib: 0.4.0
      puppetlabs-dsc_lite: 3.0.1
      ComputerManagementDSC: 8.4.0

      As a workaround, I am using '20200101000000.000000+035' as my value.

       

      Attachments

        Issue Links

          Activity

            People

              michael.lombardi Michael Lombardi
              selvakumar.subburaj Selvakumar Azhagarsami
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support