Class: HttpdConfigmapGenerator::Update
- Defined in:
- lib/httpd_configmap_generator/update.rb
Constant Summary
Constants inherited from Base
Base::APACHE_USER, Base::HOSTNAME_COMMAND, Base::HTTP_KEYTAB, Base::IPA_COMMAND, Base::KERBEROS_CONFIG_FILE, Base::LDAP_ATTRS, Base::PAM_CONFIG, Base::SSSD_CONFIG, Base::TIMESTAMP_FORMAT
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#command_run, #command_run!, #config_file_backup, #configure_pam, #cp_template, #create_target_directory, #debug_msg, #delete_target_file, #domain, #domain_from_host, #enable_kerberos_dns_lookups, #err_msg, #fetch_network_file, #file_binary?, #host_reachable?, #info_msg, #initialize, #log_command_error, #path_join, #realm, #rm_file, #run_configure, #template_directory, #update_hostname
Constructor Details
This class inherits a constructor from HttpdConfigmapGenerator::Base
Instance Method Details
#optional_options ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/httpd_configmap_generator/update.rb', line 12 def super.merge( :add_file => { :description => "Add file to config map", :short => "-a", :multi => true } ) end |
#required_options ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/httpd_configmap_generator/update.rb', line 3 def { :input => { :description => "Input config map file", :short => "-i" }, :output => { :description => "Output config map file", :short => "-o" } } end |
#update(opts) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/httpd_configmap_generator/update.rb', line 20 def update(opts) (opts) @opts = opts config_map = ConfigMap.new(opts) config_map.load(opts[:input]) config_map.add_files(opts[:add_file]) config_map.save(opts[:output]) rescue => err log_command_error(err) raise err end |