On every chef run, kafka topics were created even though the topics already existed. This was not an issue when we were using Kafka version 0.8.2.X but when we upgraded to 0.9.0.0, kafka-topics.sh behavior got changed, it started giving bad exit code which causes chef run to fail.
This fixes following:
make grep more restrictive (ie to use -w ) so topic exists command will do exact match for the topic name
pass environment to not_if guard so that kafka_topics.sh will be found in the PATH
On every chef run, kafka topics were created even though the topics already existed. This was not an issue when we were using Kafka version 0.8.2.X but when we upgraded to 0.9.0.0, kafka-topics.sh behavior got changed, it started giving bad exit code which causes chef run to fail.
This fixes following: