Class: ForemanMaintain::Feature
- Inherits:
-
Object
- Object
- ForemanMaintain::Feature
- Includes:
- Concerns::Finders, Concerns::Hammer, Concerns::Logger, Concerns::Metadata, Concerns::Reporter, Concerns::SystemHelpers, Concerns::SystemService
- Defined in:
- lib/foreman_maintain/feature.rb
Constant Summary
Constants included from Concerns::Metadata
Concerns::Metadata::MAX_PREPARATION_STEPS_DEPTH
Constants included from Concerns::OsFacts
Concerns::OsFacts::FALLBACK_OS_RELEASE_FILE, Concerns::OsFacts::OS_RELEASE_FILE
Class Method Summary collapse
Instance Method Summary collapse
-
#additional_features ⇒ Object
Override to generate additional feature instances that can’t be autodetected directly.
-
#config_files ⇒ Object
list of config files the feature uses.
- #config_files_exclude_for_online ⇒ Object
-
#config_files_to_exclude ⇒ Object
list of config files to be excluded from the list of config files.
- #inspect ⇒ Object
-
#services ⇒ Object
Override method with list of applicable services for feature.
Methods included from Concerns::Hammer
Methods included from Concerns::Finders
#check, #detector, #feature, #find_all_scenarios, #find_checks, #find_procedures, #find_scenarios, #procedure
Methods included from Concerns::Metadata
#advanced_run?, #description, included, #label, #label_dashed, #metadata, #params, #preparation_steps, #run_once?, #runtime_message, #tags
Methods included from Concerns::SystemService
#system_service, #valid_sys_service?
Methods included from Concerns::SystemHelpers
#check_max_version, #check_min_version, #command_present?, #directory_empty?, #execute, #execute!, #execute?, #execute_runner, #execute_with_status, #file_exists?, #file_nonzero?, #find_dir_containing_file, #find_package, #find_symlinks, #foreman_plugin_name, #format_shell_args, #hammer_package, #hammer_plugin_name, #hostname, included, #package_manager, #package_version, #packages_action, #parse_csv, #parse_json, #proxy_plugin_name, #repository_manager, #ruby_prefix, #server?, #shellescape, #systemd_installed?, #version
Methods included from Concerns::OsFacts
#centos?, #cpu_cores, #deb_major_version, #debian?, #debian_or_ubuntu?, #el8?, #el?, #el_major_version, #el_short_name, #facts, #memory, #os_id, #os_id_like_list, #os_name, #os_release_file, #os_version, #os_version_codename, #os_version_id, #rhel?, #ubuntu?, #ubuntu_major_version
Methods included from Concerns::Logger
Methods included from Concerns::Reporter
Class Method Details
.inspect ⇒ Object
11 12 13 |
# File 'lib/foreman_maintain/feature.rb', line 11 def self.inspect "Feature Class #{[:label]}<#{name}>" end |
Instance Method Details
#additional_features ⇒ Object
Override to generate additional feature instances that can’t be autodetected directly
30 31 32 |
# File 'lib/foreman_maintain/feature.rb', line 30 def additional_features [] end |
#config_files ⇒ Object
list of config files the feature uses
35 36 37 |
# File 'lib/foreman_maintain/feature.rb', line 35 def config_files [] end |
#config_files_exclude_for_online ⇒ Object
45 46 47 |
# File 'lib/foreman_maintain/feature.rb', line 45 def config_files_exclude_for_online [] end |
#config_files_to_exclude ⇒ Object
list of config files to be excluded from the list of config files. Can be used to exclude subdir from whole config directory
41 42 43 |
# File 'lib/foreman_maintain/feature.rb', line 41 def config_files_to_exclude [] end |
#inspect ⇒ Object
15 16 17 |
# File 'lib/foreman_maintain/feature.rb', line 15 def inspect "#{self.class.[:label]}<#{self.class.name}>" end |
#services ⇒ Object
Override method with list of applicable services for feature. Services have a number for priority in order to ensure they are started and stopped in the correct order. example:
- system_service(‘foo’, 10), system_service(‘bar’, 20)
24 25 26 |
# File 'lib/foreman_maintain/feature.rb', line 24 def services [] end |