spiceweasel
spiceweasel copied to clipboard
resolve_cookbooks still being called even when `--only nodes` is specified
My limited understanding is that this should not happen. Anyway...
NOTE: This was run against the 2.8 branch.
Output tells all:
$ be spiceweasel --loglevel debug --debug --extractlocal ./spiceweasel/manifest.yml --only nodes
DEBUG: No chefignore file found at /Users/eherot/git_repos/evertrue/chefignore no files will be ignored
WARN: found a directory tmp in the cookbook path, but it contains no cookbook files. skipping.
DEBUG: dir_ext: apache_storm 3.0.0
DEBUG: dir_ext: application 2.0.4
DEBUG: dir_ext: application_nginx 1.1.0
Contents of ./spiceweasel/manifest.yml:
clusters:
- stage:
- ec2 2:
run_list: recipe[et_base]
options: -flavor c3.large -g sg-c204d2a7 -N stage-test-eherot-N{{n}} -s subnet-a792da8f -E stage
I'm not sure this is a workflow I meant to support. The use of --extractlocal means that it's going to try to generate the knife commands to upload everything found in the chef-repo. You're specifying a manifest file, which I believe is ignored since --extractlocal is very similar to --extractyaml, which would generate a YAML file. If you want the extract behavior with --only, I could support that.
- Do you want --extract with --only?
- The title of this issue makes it sound like you don't want validation with --only. In that case, just use --novalidation and it shouldn't validate (that might be a real bug).
Perhaps there could be better wording in the docs...What do I do if I just want the knife commands to create what I have in the specified manifest file?
The --only flag is supposed to do a subset of the manifest (ie. just the cookbooks or roles or nodes). I haven't verified this, but I wouldn't be surprised if validation is still run across the entire file (--novalidation will turn that off). So if you just want the nodes from a manifest, use
spiceweasel --only nodes --novalidation infrastructure.yml