Class: ForemanAnsible::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/foreman_ansible/engine.rb,
lib/foreman_ansible/remote_execution.rb

Overview

Dependencies related with the remote execution plugin

Class Method Summary collapse

Class Method Details

.register_rex_featureObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/foreman_ansible/remote_execution.rb', line 17

def self.register_rex_feature
  RemoteExecutionFeature.register(
    :ansible_run_host,
    N_('Run Ansible roles'),
    :description => N_('Runs an Ansible playbook which contains all'\
                       ' the roles defined for a host'),
    :host_action_button => true
  )
  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
  )
  RemoteExecutionFeature.register(
    :ansible_run_playbook,
    N_('Run playbook'),
    :description => N_('Run an Ansible playbook against given hosts'),
    :provided_inputs => %w[playbook]
  )
  RemoteExecutionFeature.register(
    :ansible_enable_web_console,
    N_('Enable web console'),
    :description => N_('Run an Ansible playbook to enable web console on given hosts'),
    :host_action_button => true
  )
  RemoteExecutionFeature.register(
    :ansible_run_capsule_upgrade,
    N_('Upgrade Capsules on given hosts'),
    :description => N_('Upgrade Capsules on given Capsule server hosts')
  )
end