- name: Ensure marker directory exists ansible.builtin.file: path: /run/tuxflotte/agent/applied state: directory mode: "0755" # Google Earth Pro gibt es nicht als Flatpak - Google vertreibt nur eigene # .deb/.rpm-Pakete direkt. Beide Backends (fedora, mint) nutzen denselben # Rollennamen "google-earth" (siehe blueprints-Seed, gleiches Muster wie bei # guest-session), die Rolle installiert je nach os_family das passende Paket. - name: Install Google Earth Pro (Debian/Mint) ansible.builtin.apt: deb: https://dl.google.com/dl/earth/client/current/google-earth-pro-stable_current_amd64.deb update_cache: true when: tuxflotte_state == "present" and ansible_facts['os_family'] == 'Debian' - name: Install Google Earth Pro (Fedora) ansible.builtin.dnf: name: https://dl.google.com/dl/earth/client/current/google-earth-pro-stable_current_x86_64.rpm state: present when: tuxflotte_state == "present" and ansible_facts['os_family'] == 'RedHat' - name: Record that the google-earth role ran ansible.builtin.copy: dest: /run/tuxflotte/agent/applied/google-earth.marker content: "{{ ansible_date_time.iso8601 }}\n" mode: "0644" when: tuxflotte_state == "present" - name: Remove Google Earth Pro (Debian/Mint, Auftrag abgewählt) ansible.builtin.apt: name: google-earth-pro-stable state: absent when: tuxflotte_state == "absent" and ansible_facts['os_family'] == 'Debian' - name: Remove Google Earth Pro (Fedora, Auftrag abgewählt) ansible.builtin.dnf: name: google-earth-pro-stable state: absent when: tuxflotte_state == "absent" and ansible_facts['os_family'] == 'RedHat' - name: Remove google-earth marker (Auftrag abgewählt) ansible.builtin.file: path: /run/tuxflotte/agent/applied/google-earth.marker state: absent when: tuxflotte_state == "absent"