Sha256: 7b922b3a777084406e5d61931d33222d2f254f099f8a2e3b62a95d48716b657a

Contents?: true

Size: 1.51 KB

Versions: 3

Compression:

Stored size: 1.51 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 LcmV4 < LcmBase

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

        def lcm_configuration_script
          <<-LCMSETUP
            configuration SetupLCM
            {
              LocalConfigurationManager
              {
                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_v4.rb
kitchen-dsc-0.12.0 lib/kitchen/provisioner/dsc_lcm/lcm_v4.rb
kitchen-dsc-0.11.1 lib/kitchen/provisioner/dsc_lcm/lcm_v4.rb