feat: LibreOffice-Rolle als weitere Office-Suite

Neben OnlyOffice als zusätzliche Katalog-Option, distro-unabhängig
über Flatpak (org.libreoffice.LibreOffice), gleiches present/absent-
Muster wie die onlyoffice-Rolle.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Thomas Stallinger 2026-08-06 08:45:04 +02:00
parent 97220bfecc
commit dc1cb25da0
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1 @@
tuxflotte_state: present

View File

@ -0,0 +1,41 @@
- name: Ensure marker directory exists
ansible.builtin.file:
path: /run/tuxflotte/agent/applied
state: directory
mode: "0755"
- name: Ensure flathub remote is configured
community.general.flatpak_remote:
name: flathub
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
state: present
method: system
when: tuxflotte_state == "present"
- name: Install LibreOffice via Flatpak
community.general.flatpak:
name: org.libreoffice.LibreOffice
remote: flathub
state: present
method: system
when: tuxflotte_state == "present"
- name: Record that the libreoffice role ran
ansible.builtin.copy:
dest: /run/tuxflotte/agent/applied/libreoffice.marker
content: "{{ ansible_date_time.iso8601 }}\n"
mode: "0644"
when: tuxflotte_state == "present"
- name: Remove LibreOffice Flatpak (Auftrag abgewählt)
community.general.flatpak:
name: org.libreoffice.LibreOffice
state: absent
method: system
when: tuxflotte_state == "absent"
- name: Remove libreoffice marker (Auftrag abgewählt)
ansible.builtin.file:
path: /run/tuxflotte/agent/applied/libreoffice.marker
state: absent
when: tuxflotte_state == "absent"

View File

@ -38,3 +38,12 @@
tuxflotte_state: "{{ tuxflotte_auftrag_states.get('onlyoffice', 'present') }}" tuxflotte_state: "{{ tuxflotte_auftrag_states.get('onlyoffice', 'present') }}"
tuxflotte_optionen: "{{ tuxflotte_auftrag_optionen.get('onlyoffice', {}) }}" tuxflotte_optionen: "{{ tuxflotte_auftrag_optionen.get('onlyoffice', {}) }}"
tags: onlyoffice tags: onlyoffice
- include_role:
name: libreoffice
apply:
tags: libreoffice
vars:
tuxflotte_state: "{{ tuxflotte_auftrag_states.get('libreoffice', 'present') }}"
tuxflotte_optionen: "{{ tuxflotte_auftrag_optionen.get('libreoffice', {}) }}"
tags: libreoffice