class MStrap::Configuration
- MStrap::Configuration
- Reference
- Object
Included Modules
Defined in:
mstrap/configuration.crConstant Summary
-
DEFAULT_PROFILE_CONFIG_DEF =
Defs::DefaultProfileConfigDef.new
Constructors
Instance Method Summary
-
#config_path : String
Returns path to configuration file
-
#known_profile_configs : Array(MStrap::Defs::ProfileConfigDef)
Returns known profile configurations
-
#load_profiles!(force = false)
Loads all profiles and resolves them into the resolved_profile
-
#loaded_profile_configs : Array(MStrap::Defs::ProfileConfigDef)
Returns loaded profile configurations
-
#loaded_profiles : Array(MStrap::Defs::ProfileDef)
Returns loaded profiles
-
#loaded_profiles?
Returns whether profiles have been loaded
-
#profile_configs
Returns profile configurations for active profiles
-
#profiles
Returns active profiles
-
#reload!(force = false)
Resets and reloads configuration and any managed profiles.
-
#resolved_profile : MStrap::Defs::ProfileDef
Returns resolved profile.
-
#save!
Saves configuration back to disk
-
#user : MStrap::User
Returns the mstrap user
Instance methods inherited from module MStrap::DSL::System
cmd(env : Hash | Nil, command : String, args : Array(String) | Nil, shell = true, input = Process::Redirect::Inherit, output = Process::Redirect::Inherit, error = Process::Redirect::Inherit, quiet = false, sudo = false)
cmd
Instance methods inherited from module MStrap::DSL::Logging
log(msg)
log,
logc(msg)
logc,
logd(msg)
logd,
logn(msg)
logn,
logw(msg)
logw,
success(msg)
success
Constructor Detail
Instance Method Detail
Returns known profile configurations
Loads all profiles and resolves them into the resolved_profile
Raises ConfigurationNotFoundError if a profile cannot be found.
Returns loaded profile configurations
Resets and reloads configuration and any managed profiles.
Raises ConfigurationNotFoundError if the mstrap configuration cannot be found or accessed, or any managed profiles cannot be found or accessed.
Returns resolved profile. This is the result of merging loaded managed profiles with the default profiles.