chain for loop was using iteritems which isn't available in Python3 anymore and was throwing an exception when run with Salt on Python3.