I am upgrading my cookbooks from Chef version 12.11.18 to 13.6.4. Some version 13 specific instructions do not work in Chef version 12 and vice versa. My existing servers still use Chef Client 12, but the new servers will launch with Chef version 13 in the same environment, so the same cookbook version should work with both versions of Chef.
I need to detect the version of the Chef Client in a recipe and select the version specific code with an "if" statement. How can I read the version of the Chef Client in a Chef recipe?