Our checkout service reads the list of countries we deliver to from a JSON file, and Ansible writes that file from a list in group_vars. In October we started delivering to Norway. The change was one line, NO added to the list between DK and SE, it passed review and it went out on a Tuesday. A week later the commercial team asked why Norway had produced no orders at all, when the launch email had gone to eleven thousand customers there.
Norwegian customers had been told at the first step of checkout that we did not deliver to their country. The JSON file on the servers said why. The list read "DK", false, "SE".
Ansible parses its variables files with PyYAML, which follows YAML 1.1. In YAML 1.1 an unquoted yes, no, on or off, in lower case, capitalised or in capitals, is a boolean. So NO was never the string NO. It was the value false from the moment the file was read, and the to_json filter in our template wrote it out faithfully as false.…