Every evening at half past six a script on our integration server sends the day's parcel manifest to one of our carriers. Without it, their hub has parcels it cannot match to anything. The script runs from cron as the integration user, and in October we moved it into an Ansible role with a template task: owner integration, mode: 755.
The next morning the carrier rang. Four hundred and twelve parcels had arrived at their hub overnight with no manifest and were being held. Cron had run the script on time and it had failed with Permission denied. The error went to the integration user's local mailbox, which nobody reads.
ls -l showed the file as --wxrw--wt. Ansible had done exactly what we asked. In YAML 755 is the integer seven hundred and fifty five, and the file module treats an integer mode as a number, not as octal digits. Seven hundred and fifty five in octal is 1363: the sticky bit, write and execute for the owner, read and write for the group, write and execute for everyone else.…