Skip to content
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

EnvironHash improvements #40

Open
Jaymon opened this issue Aug 23, 2024 · 0 comments
Open

EnvironHash improvements #40

Jaymon opened this issue Aug 23, 2024 · 0 comments

Comments

@Jaymon
Copy link
Owner

Jaymon commented Aug 23, 2024

It would be nice if EnvironHash could take a directory when being created, then you could just call files, something like this:

require ::File.join("cookbooks", "environ", "libraries", "environ")
environ = ::EnvironHash.new("<DIRECTORY-PATH>")
environ.load_files("common.sh", "dev.sh")

The environ script has to create an environment hash and then pass that every time it uses the environ resource, it would be nice if it could do that in the resource, this seems to be bad form, but could maybe be done?

property(:foo, default: lazy { node["whatever"] })

The reason why the EnvironHash is created in the default recipe and then passed to the resource is because it needs access to the node configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant