Class: ForemanOpenscap::ClientConfig::Ansible
- Inherits:
-
Base
- Object
- Base
- ForemanOpenscap::ClientConfig::Ansible
show all
- Defined in:
- app/services/foreman_openscap/client_config/ansible.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#all_collection_method, #collection_method, #ds_policies_param_default_value, #find_config_item, #managed_overrides?
Constructor Details
#initialize(policy_class) ⇒ Ansible
Returns a new instance of Ansible.
9
10
11
12
|
# File 'app/services/foreman_openscap/client_config/ansible.rb', line 9
def initialize(policy_class)
raise "Unknown policy class, expected one of: #{policy_types.map(&to_s).join(', ')}" unless policy_types.include?(policy_class)
initialize_constants(policy_class)
end
|
Instance Attribute Details
#constants ⇒ Object
Returns the value of attribute constants.
5
6
7
|
# File 'app/services/foreman_openscap/client_config/ansible.rb', line 5
def constants
@constants
end
|
Instance Method Details
#ansible_role_missing_msg ⇒ Object
30
31
32
|
# File 'app/services/foreman_openscap/client_config/ansible.rb', line 30
def ansible_role_missing_msg
_("theforeman.foreman_scap_client Ansible Role not found, please import it before running this action again.")
end
|
#available? ⇒ Boolean
18
19
20
|
# File 'app/services/foreman_openscap/client_config/ansible.rb', line 18
def available?
defined?(ForemanAnsible)
end
|
#inline_help ⇒ Object
22
23
24
25
26
27
28
|
# File 'app/services/foreman_openscap/client_config/ansible.rb', line 22
def inline_help
{
:text => "Requires Ansible plugin, #{ansible_role_name} Ansible role and variables. This will assign the role to the hosts or selected hostgroups.<br>To deploy foreman_scap_client, ansible roles run needs to be triggered manually. Manual run is also required after any change to this policy.",
:replace_text => 'Ansible role',
:route_helper_method => :hash_for_ansible_roles_path
}
end
|
#type ⇒ Object
14
15
16
|
# File 'app/services/foreman_openscap/client_config/ansible.rb', line 14
def type
:ansible
end
|