I have run a playbook that updates an app of ours on numerous customer VM’s. This playbook has run fine many times, but today when I ran it to update 6 servers, one of my variables was not properly put into the target files on 4 of the 6 VM’s. More specifically, this variable is a four digit unique identifier to the VM. I triple checked my variable declarations in the inventory (hosts) file before running the playbook and after the problem was found. The playbook, on 4 of the 6 machines, did not put in the 4 digits I assigned, rather it put in 3 other (random?) digits.
Without knowing what those 4 digit identifiers are, it would be hard to say. Do they start with the number 0? If so, they may have been treated as oct instead of int, and then the int was placed in that file.
Such as 0456 being the same as 302, where 0456 was oct, and 302 is the int value.
As a matter of fact they all do start with zero. I understand your explanation, but one thing bothers me about it: when this playbook ran earlier on four machines, those site numbers all started with 0 and we had no problem, and on this run all 6 started with 0 and we only had the problem on 4 machines. I believe that if ansible were treating these as oct it would be consistent in doing so, but I’ve been using ansible for over a year now, with the 4 digit identifiers in almost every playbook, but never has this happened before.