Make playbook.yml idempotent and refactor