A setup script that appends a line every time it runs breaks the second time you run it. Idempotency means running the playbook once or ten times leaves the server in the same state, so re-running is always safe. It matters when a run fails halfway or a server has drifted and you just run everything again. The command and shell modules are not idempotent by default, so prefer real modules or add guards like creates:.