Sha256: 58a771da979913feab1f7d44e9c9a5409590ee07eca4a61013e2f8c69e8b7a1f

Contents?: true

Size: 1.54 KB

Versions: 3

Compression:

Stored size: 1.54 KB

Contents

#
# Author:: Steven Murawski (<steven.murawski@gmail.com>)
#
# Copyright (C) 2014 Steven Murawski
#
# Licensed under the Apache 2 License.
# See LICENSE for more details

require_relative "lcm_base"

module Kitchen
  module Provisioner
    module DscLcm
      class LcmV5 < LcmBase

        def lcm_properties
          {
            action_after_reboot: "StopConfiguration",
            allow_module_overwrite: false,
            certificate_id: nil,
            configuration_mode: "ApplyAndAutoCorrect",
            configuration_mode_frequency_mins: 15,
            debug_mode: "All",
            reboot_if_needed: false,
            refresh_mode: "PUSH",
            refresh_frequency_mins: 30,
          }
        end

        def lcm_configuration_script
          <<-LCMSETUP
            [DSCLocalConfigurationManager()]
            configuration SetupLCM
            {
              Settings
              {
                ActionAfterReboot = '#{action_after_reboot}'
                AllowModuleOverwrite = [bool]::Parse('#{allow_module_overwrite}')
                CertificateID = #{certificate_id}
                ConfigurationMode = '#{configuration_mode}'
                ConfigurationModeFrequencyMins = #{configuration_mode_frequency_mins}
                DebugMode = '#{debug_mode}'
                RebootNodeIfNeeded = [bool]::Parse('#{reboot_if_needed}')
                RefreshFrequencyMins = #{refresh_frequency_mins}
                RefreshMode = '#{refresh_mode}'
              }
            }
          LCMSETUP
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kitchen-dsc-0.12.1 lib/kitchen/provisioner/dsc_lcm/lcm_v5.rb
kitchen-dsc-0.12.0 lib/kitchen/provisioner/dsc_lcm/lcm_v5.rb
kitchen-dsc-0.11.1 lib/kitchen/provisioner/dsc_lcm/lcm_v5.rb