--- - name: check if post-post-install script is present stat: path: /post-install-finalize register: hetzner_post_install_finalize - name: run post-install-finalize script when: hetzner_post_install_finalize.stat.exists command: /post-install-finalize - name: remove installimage artifacts loop: - /etc/apt/sources.list.d/hetzner-security-updates.list - /installimage.conf - /installimage.debug - /post-install - /post-install-finalize - /target file: path: "{{ item }}" state: absent