Class: Simp::Cli::Config::Item::SssdDomains
- Inherits:
-
ListItem
- Object
- Simp::Cli::Config::Item
- ListItem
- Simp::Cli::Config::Item::SssdDomains
- Defined in:
- lib/simp/cli/config/item/sssd_domains.rb
Instance Attribute Summary
Attributes inherited from ListItem
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 ⇒ SssdDomains
constructor
A new instance of SssdDomains.
- #query_ask ⇒ Object
- #validate_item(x) ⇒ Object
Methods inherited from ListItem
#highline_question_type, #not_valid_message, #query_extras, #validate
Methods inherited from Simp::Cli::Config::Item
#apply, #default_value, #highline_question_type, #next_items, #not_valid_message, #os_value, #print_banner, #print_summary, #puppet_value, #query, #query_extras, #query_status, #recommended_value, #safe_apply, #say_blue, #say_green, #say_red, #say_yellow, #to_yaml_s, #validate
Constructor Details
#initialize ⇒ SssdDomains
Returns a new instance of SssdDomains.
10 11 12 13 14 15 16 17 18 |
# File 'lib/simp/cli/config/item/sssd_domains.rb', line 10 def initialize super @key = 'sssd::domains' @description = %Q{ A list of domains for SSSD to use. `simp config` will automativcally populate this field with `FQDN` if `use_fqdn` is true, otherwise it will comment out the field. }.gsub(/^\s+/, '' ) end |
Instance Method Details
#query_ask ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/simp/cli/config/item/sssd_domains.rb', line 25 def query_ask use_ldap = @config_items.fetch( 'use_ldap' ).value if use_ldap @value = ['LDAP'] else @skip_yaml = true @value = [] end end |
#validate_item(x) ⇒ Object
21 22 23 |
# File 'lib/simp/cli/config/item/sssd_domains.rb', line 21 def validate_item( x ) x =~ /[-a-z]/i ? true : false end |