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

model_path doesn't update when config_path is modified in wrapper cookbok #29

Open
nozpheratu opened this issue Jan 7, 2015 · 0 comments

Comments

@nozpheratu
Copy link

The model_path is currently being computed based on the config_path value as seen below:

default['backup']['model_path'] = "#{node['backup']['config_path']}/models"

If you change the config_path attribute to point to something other than the /etc/backup default then the deploy will fail. Reason being, derived attributes aren't updated when the attributes they make use of get updated. In order for the value to be set correctly you either have to manually set the derived attribute in addtion to config_path, or use a role or environment. Since I'm using chef-solo I also have the option of setting config_path directly in the node file, but I'd like to avoid the duplication.

As mentioned in this blog post on derived attributes, an easy fix is to simply change model_path to be a variable that gets computed in the default recipe.

@nozpheratu nozpheratu changed the title Can we make model_path a variable? model_path doesn't update when config_path is modified in wrapper cookbok Jan 7, 2015
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