top | item 37775757

(no title)

tagirb | 2 years ago

Exactly there I was hit so many times by not using quotes around file permissions, because 0644 is interpreted as 420 and Ansible sets the permissions to '-r---w----' instead of '-rw-r--r--'.

Here's a relevant suggestion from the Ansible docs (https://docs.ansible.com/ansible/latest/collections/ansible/...):

For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must give Ansible enough information to parse them correctly. For consistent results, quote octal numbers (for example, '644' or '1777') so Ansible receives a string and can do its own conversion from string into number. Adding a leading zero (for example, 0755) works sometimes, but can fail in loops and some other circumstances.

discuss

order

tagirb|2 years ago

Despite this, I still think YAML is a nice configuration language. The problem is not with YAML, it's with the whole complexity we're trying to represent there. Whatever configuration language you use, the outcome will be the same. Reduce the complexity, and it will shine.

lifehasleft|2 years ago

Oh my god I think you solved a work problem I was recently having