Provide the master's version in pillar.data

This allows you to make decisions based on the minion version and
master version, for example, running pkg.install only if the
salt-minion is out of date

Grains would have the minion's version
Pillar would have the master's version
{% if grains['saltversion'] != pillar['master']['saltversion'] %}