-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yaml instead of Puppetfile? #174
Comments
I don't quite understand your first sentence. What are you doing with r10k and a Yaml file? If you mean if g10k currently supports a |
Maybe a little example helps. Here is the full content of my require 'yaml'
datapath = File.expand_path('modules.yaml', File.join(__FILE__, '..'))
modules = YAML.load_file(datapath)
@data = []
modules.each do |m|
name = m['name']
opts = {}
m.each do |k, v|
opts[k.to_sym] = v if k.to_sym != :name
end
mod(name, opts)
end So basically I'm loading the data from a yaml file and then executing a I didn't know about |
This isn't quite what you're looking for, but r10k has the ability to determine what environments exist and what modules should be in each environment through either a yaml file, a directory of yaml files, or an executable that returns the content expected on stdin. It's still experimental. Though if you implement a Puppetfile.yaml it might be useful to re-use the format? |
I think the above one is a hack you can do because the Puppetfile is interpreted by r10k as ruby. Maybe this is not a good idea to do that and implement such thing. Because g10k is written in go otherwise you have to implement a crazy thing like parse Pupetfile with ruby in golang... definetly not recommend this here... |
I don't think ruby needs to be part of the solution at all, if it were taken on. Mostly this would just be another file format in yaml to contain the list of modules. |
I'm currently using
r10k
to the Puppetfile to read a yaml file and run the module install. But would it be possible for this utility to read the the yaml directly? Perhaps we just need a structure to read. I have another process that updates the yaml directly, which is easier to do than updating the Puppetfile. Is this possible today?The text was updated successfully, but these errors were encountered: