Sha256: fb84eeeecc20777a20fd6e1afbdcee977374503c66ec04df94010d1ebec8bca2

Contents?: true

Size: 783 Bytes

Versions: 36

Compression:

Stored size: 783 Bytes

Contents

# frozen_string_literal: true

module Bolt
  class Task
    class PuppetServer < Bolt::Task
      def remote_instance
        self.class.new(to_h.each_with_object({}) { |(k, v), h| h[k.to_s] = v },
                       @file_cache,
                       remote: true)
      end

      def initialize(task, file_cache, **opts)
        super(task, **opts)
        @file_cache = file_cache
        update_file_data(task)
      end

      # puppetserver file entries have 'filename' rather then 'name'
      def update_file_data(task_data)
        task_data['files'].each { |f| f['name'] = f['filename'] }
        task_data
      end

      def file_path(file_name)
        file = file_map[file_name]
        file['path'] ||= @file_cache.update_file(file)
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
bolt-1.47.0 lib/bolt/task/puppet_server.rb
bolt-1.45.0 lib/bolt/task/puppet_server.rb
bolt-1.44.0 lib/bolt/task/puppet_server.rb
bolt-1.43.0 lib/bolt/task/puppet_server.rb
bolt-1.42.0 lib/bolt/task/puppet_server.rb
bolt-1.41.0 lib/bolt/task/puppet_server.rb
bolt-1.40.0 lib/bolt/task/puppet_server.rb
bolt-1.39.0 lib/bolt/task/puppet_server.rb
bolt-1.38.0 lib/bolt/task/puppet_server.rb
bolt-1.37.0 lib/bolt/task/puppet_server.rb
bolt-1.36.0 lib/bolt/task/puppet_server.rb
bolt-1.35.0 lib/bolt/task/puppet_server.rb
bolt-1.34.0 lib/bolt/task/puppet_server.rb
bolt-1.33.0 lib/bolt/task/puppet_server.rb
bolt-1.32.0 lib/bolt/task/puppet_server.rb
bolt-1.31.1 lib/bolt/task/puppet_server.rb
bolt-1.31.0 lib/bolt/task/puppet_server.rb
bolt-1.30.1 lib/bolt/task/puppet_server.rb
bolt-1.30.0 lib/bolt/task/puppet_server.rb
bolt-1.29.1 lib/bolt/task/puppet_server.rb