mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
Merge pull request #91 from nwolfe/maint/remove-warning
(maint) Remove warning about missing configuration file
This commit is contained in:
commit
5a0640c515
2 changed files with 4 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ class Vmfloaty
|
|||
|
||||
def run # rubocop:disable Metrics/AbcSize
|
||||
program :version, Vmfloaty::VERSION
|
||||
program :description, "A CLI helper tool for Puppet's vmpooler to help you stay afloat"
|
||||
program :description, "A CLI helper tool for Puppet's vmpooler to help you stay afloat.\n\nConfiguration may be placed in a ~/.vmfloaty.yml file."
|
||||
|
||||
config = Conf.read_config
|
||||
|
||||
|
|
@ -90,6 +90,7 @@ class Vmfloaty
|
|||
c.option '--json', 'Prints information as JSON'
|
||||
c.option '--token STRING', String, 'Token for pooler service'
|
||||
c.option '--url STRING', String, 'URL of pooler service'
|
||||
c.option '--user STRING', String, 'User to authenticate with'
|
||||
c.action do |args, options|
|
||||
verbose = options.verbose || config['verbose']
|
||||
|
||||
|
|
@ -212,6 +213,7 @@ class Vmfloaty
|
|||
c.option '--json', 'Outputs hosts scheduled for deletion as JSON'
|
||||
c.option '--token STRING', String, 'Token for pooler service'
|
||||
c.option '--url STRING', String, 'URL of pooler service'
|
||||
c.option '--user STRING', String, 'User to authenticate with'
|
||||
c.action do |args, options|
|
||||
verbose = options.verbose || config['verbose']
|
||||
service = Service.new(options, config)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class Conf
|
|||
begin
|
||||
conf = YAML.load_file("#{Dir.home}/.vmfloaty.yml")
|
||||
rescue StandardError
|
||||
FloatyLogger.warn "WARNING: There was no config file at #{Dir.home}/.vmfloaty.yml"
|
||||
# ignore
|
||||
end
|
||||
conf
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue