SUSE/pennyworth

pennyworrth host list thows error when no hosts.yaml exsits

Opened this issue · 0 comments

When handling hosts with pennyworth a config file contianing their information is required. if that is missing peenyworth currently exists very ungraceful:

./bin/pennyworth host list
Pennyworth experienced an unexpected error. Please file a bug report at https://github.com/SUSE/pennyworth/issues/new.
/usr/src/chuller/pennyworth/lib/host_config.rb:61:in `read': No such file or directory @ rb_sysopen - /suse/chuller/.pennyworth/hosts.yaml (Errno::ENOENT)

It would be better to catch this condition and tell the user what to do to get the config file into place