It is not ‘offense’ it is just a bad way to do this, as mentioned above there is an inherit race condition: 2 or more processes replacing the same file with different versions. Sometimes you’ll luck out and you won’t lose data, but you should not code counting on luck, but predictable and reproducible results.
bcoca
(Brian Coca)
32
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Ansible lininfile behavior | 22 | 59 | May 10, 2020 | |
| iterating over stdout_lines list | 3 | 109 | July 5, 2018 | |
| lineinfile with serial is overwriting the data | 1 | 40 | February 23, 2017 | |
| Ansible - overwriting file lineinfile when run in parallel | 4 | 125 | June 27, 2019 | |
| Lineinfile task problem | 7 | 173 | July 28, 2024 |