Sha256: ecc956181933c919e1f03a6a50ef02d8d553f9ec0edc801e4d2475a366c4bd6e

Contents?: true

Size: 1.02 KB

Versions: 17

Compression:

Stored size: 1.02 KB

Contents

require 'foreman_remote_execution'

module ForemanAnsible
  # Dependencies related with the remote execution plugin
  class Engine < ::Rails::Engine
    config.to_prepare do
      RemoteExecutionProvider.register(
        :Ansible,
        ForemanAnsible::AnsibleProvider
      )

      ForemanAnsible::Engine.register_rex_feature
    end

    def self.register_rex_feature
      RemoteExecutionFeature.register(
        :ansible_run_host,
        N_('Ansible: Run host roles'),
        :description => N_('Runs an Ansible playbook which contains all'\
                           ' the roles defined for a host')
      )
      RemoteExecutionFeature.register(
        :ansible_run_insights_plan,
        N_('Ansible: Run Insights maintenance plan'),
        :description => N_('Runs a given maintenance plan from Red Hat '\
                           'Access Insights given an ID.'),
        :provided_inputs => %w[organization_id plan_id],
        :notification_builder => ForemanAnsible::InsightsNotificationBuilder
      )
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
foreman_ansible-2.2.14 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.13 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.12 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.11 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.10 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.9 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.8 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.7 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.6 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.5 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.4 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.3 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.2 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.1 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.2.0 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.1.2 lib/foreman_ansible/remote_execution.rb
foreman_ansible-2.1.1 lib/foreman_ansible/remote_execution.rb