I have a small application installed on a few servers, I wanted to write a quick recipe that will allow me to gather the version number from these servers.
This is what I've written:
bash "Get app version" do
code <<-EOH
cat /var/lib/myapp/node_modules/myapp/package.json | grep version
EOH
end
However when I run the knife bootstrap command, I don't see the output in my console, even if I run it with -VV
the output is not there.
I have two questions:
- Is this the best way for me to collect the version numbers?
- Why doesn't the
cat
results appear in my console?