"'3' if ansible_python.version.major == 3" fatally exits on systems with Python versions less than 3. Adding the "else" statement corrects the fatal error.