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:
parent
97220bfecc
commit
dc1cb25da0
1
roles/libreoffice/defaults/main.yml
Normal file
1
roles/libreoffice/defaults/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
tuxflotte_state: present
|
||||||
41
roles/libreoffice/tasks/main.yml
Normal file
41
roles/libreoffice/tasks/main.yml
Normal 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"
|
||||||
9
site.yml
9
site.yml
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user