You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an intermediate step, or as the whole feature, allow the user to pass a template on the command line. So, if the user runs
$ ops init my_template.yml
ops should look in the usual place for a template called my_template.yml. If it's not found, look for a file called my_template.yml.
Users could even put their templates in a directory that is easy to reference globally:
$ ops init ~/.ops/my_template.yml
Not quite as nice as having a ~/.ops/tempaltes/my_template and just running ops init my_template, though, so ops should probably still support the original idea as well. In that case, ops should look in:
the user template dir, then
the ops template dir, then
try to find a file with the given name
The reason to look in template directories before looking for a file is that if there is a file or directory in the current directory called ruby or terraform, ops would try to load it as a template. This would make any file or directory name that was also the name of an ops template a bit of a landmine for the user.
ops
has some built-in templates (e.g.ruby
,terraform
). If a user wants a different template, they have to either:ops
should look for templates first in~/.ops/templates
, then fall back to built-in templates.The
~/.ops
directory can be used in the future for global (rather than project-specific) config.The text was updated successfully, but these errors were encountered: