-
Notifications
You must be signed in to change notification settings - Fork 8
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
Repo specific config? #29
Comments
Hi, By tracking the sharp config, you mean in the same repo as cookbooks and chef things ? For us it's just another dotfile, so each one tracks it the way he wants... Not sure to understand the problem |
Since knife.rb accepts any directive, you can add an option in it, for instance : sharp_config_path '/path/to/your/sharp-config.yml' Then, in SharpAlign#setup, if the option is set, add its value to the array of possible configs or even override its content. Here: https://github.com/Fotolia/knife-sharp/blob/master/lib/chef/knife/sharp-align.rb#L63 |
Yeah, I want to have the file in [chef-repo]/config/sharp-config.yml, so I just put in knife.rb the directive you mentioned? I was going to quit, because I keep getting a "wrong data bag path". The config to the git repo is correct and I just don't know what else to do. I edited the gem locally to show what the path of the problem was, this is the output: $ knife sharp align master _default -D I have no idea why the path it's using is that one and not the one set in global, git_cookbook_path in the yaml file. |
About the config path, if you want to put the directive in knife.rb, you have to retrieve it in the code where I mentionned, no magic there :) About the data bags, the documentation is indeed lacking that very detail, we will update it in the next days. cookbook_path '/home/jamiez/sysadmin/chef/cookbooks'
data_bag_path '/home/jamiez/sysadmin/chef/data_bags'
role_path '/home/jamiez/sysadmin/chef/roles' which default to /var/chef/* if absent. Have a look to SharpAlign#setup for the details. |
Did you work out something about this ? |
Sorry for the delay! I did manage to have it working as expected regarding the configuration. However, when I went to align the data bags, I couldn't continue because I had no local data bags and only one in the server I think. It seemed like having no local databags was considered an error. I wanted to save time in handling data bags and ensuring some extra order in our process but this was for a very very fast project and I run out of time to try new things so I kept it very manual without knife-sharp :( |
Hi.
In our company we'd like to track the sharp config in the repository.We have a knife.rb that we can track in git and we'd like to keep our stack files fully containerized. I forked the current version and see it would be very hard to solve.
However, I wanted to check if there's a specific reason why you have avoided this and if you'd think it'd be useful. Then maybe we could contribute this simple add-on.
Looking forward,
DPT
The text was updated successfully, but these errors were encountered: