--- - name: "***www*** : 1) Überprüfen ob das Backup der Konfigurationsdatei '{{ config_file }}' bereits existiert" ansible.builtin.stat: # https://docs.ansible.com/ansible/latest/modules/stat_module.html path: '{{ backup_file }}' register: stat_result - name: "***www*** : 2) Von der bestehenden originalen Konfigurationsdatei '{{ config_file }}' ein Backup '{{ backup_file }}' erstellen" copy: # https://docs.ansible.com/ansible/latest/modules/copy_module.html remote_src: yes src: '{{ config_file }}' dest: '{{ backup_file }}' when: stat_result.stat.exists == False