Sha256: 0e346409277e706c9cb3910e29c6121d8b4c39550e1831f8b271df896d77f3ca

Contents?: true

Size: 799 Bytes

Versions: 16

Compression:

Stored size: 799 Bytes

Contents

# frozen_string_literal: true

module Bolt
  class Plugin
    class InstallAgent
      def hooks
        %i[puppet_library]
      end

      def name
        'install_agent'
      end

      def initialize(*args); end

      def puppet_library(_opts, target, apply_prep)
        install_task = apply_prep.get_task("puppet_agent::install")
        service_task = apply_prep.get_task("service", 'action' => 'stop', 'name' => 'puppet')
        proc do
          apply_prep.run_task([target], install_task).first
          apply_prep.set_agent_feature(target)
          apply_prep.run_task([target], service_task, 'action' => 'stop', 'name' => 'puppet').first
          apply_prep.run_task([target], service_task, 'action' => 'disable', 'name' => 'puppet').first
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bolt-1.45.0 lib/bolt/plugin/install_agent.rb
bolt-1.44.0 lib/bolt/plugin/install_agent.rb
bolt-1.43.0 lib/bolt/plugin/install_agent.rb
bolt-1.42.0 lib/bolt/plugin/install_agent.rb
bolt-1.41.0 lib/bolt/plugin/install_agent.rb
bolt-1.40.0 lib/bolt/plugin/install_agent.rb
bolt-1.39.0 lib/bolt/plugin/install_agent.rb
bolt-1.38.0 lib/bolt/plugin/install_agent.rb
bolt-1.37.0 lib/bolt/plugin/install_agent.rb
bolt-1.36.0 lib/bolt/plugin/install_agent.rb
bolt-1.35.0 lib/bolt/plugin/install_agent.rb
bolt-1.34.0 lib/bolt/plugin/install_agent.rb
bolt-1.33.0 lib/bolt/plugin/install_agent.rb
bolt-1.32.0 lib/bolt/plugin/install_agent.rb
bolt-1.31.1 lib/bolt/plugin/install_agent.rb
bolt-1.31.0 lib/bolt/plugin/install_agent.rb