Two Ansible roles overwrote each other's hosts file blocks, dropping partner SFTP routes
A monitoring role added to an existing Ansible playbook caused partner hostnames to disappear from /etc/hosts on integration gateways. Both roles used blockinfile with the default marker lines, so each treated the other's block as its own and replaced it on every run. The result was that only the second role's entries survived, and file transfers to three partners failed with name resolution errors. The tasks reported changed on every run, a warning sign that was overlooked. The fix gave each role a unique marker and removed the old default block, and the partner names were moved into internal DNS.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in