Class: Simp::Cli::Config::Item::PuppetCAPort
- Inherits:
-
Simp::Cli::Config::Item
- Object
- Simp::Cli::Config::Item
- Simp::Cli::Config::Item::PuppetCAPort
- Defined in:
- lib/simp/cli/config/item/puppet_ca_port.rb
Instance Attribute Summary
Attributes inherited from Simp::Cli::Config::Item
#allow_user_apply, #config_items, #description, #die_on_apply_fail, #fact, #fail_on_missing_answer, #key, #next_items_tree, #silent, #skip_apply, #skip_query, #skip_yaml, #value
Instance Method Summary collapse
-
#initialize ⇒ PuppetCAPort
constructor
A new instance of PuppetCAPort.
- #os_value ⇒ Object
- #recommended_value ⇒ Object
- #validate(x) ⇒ Object
Methods inherited from Simp::Cli::Config::Item
#apply, #default_value, #highline_question_type, #next_items, #not_valid_message, #print_banner, #print_summary, #puppet_value, #query, #query_ask, #query_extras, #query_status, #safe_apply, #say_blue, #say_green, #say_red, #say_yellow, #to_yaml_s
Constructor Details
#initialize ⇒ PuppetCAPort
Returns a new instance of PuppetCAPort.
10 11 12 13 14 |
# File 'lib/simp/cli/config/item/puppet_ca_port.rb', line 10 def initialize super @key = 'puppet::ca_port' @description = 'The port which the Puppet CA will listen on (8141 by default).' end |
Instance Method Details
#os_value ⇒ Object
16 17 18 |
# File 'lib/simp/cli/config/item/puppet_ca_port.rb', line 16 def os_value Puppet.settings.setting( 'ca_port' ).value end |
#recommended_value ⇒ Object
24 25 26 |
# File 'lib/simp/cli/config/item/puppet_ca_port.rb', line 24 def recommended_value 8141 end |
#validate(x) ⇒ Object
20 21 22 |
# File 'lib/simp/cli/config/item/puppet_ca_port.rb', line 20 def validate( x ) (x.to_s =~ /^\d+$/ ? true : false ) && x.to_i > 0 && x.to_i <= 65535 end |