From 00c663a6946599479489bccafb590507aa19f42d Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 2 Apr 2025 00:48:01 +0200 Subject: [PATCH] Optimized libreoffice role --- group_vars/all/07_applications.yml | 22 ++++++++------ roles/pc-libreoffice/README.md | 45 ++++++++++------------------- roles/pc-libreoffice/meta/main.yml | 22 +++++++++++++- roles/pc-libreoffice/tasks/main.yml | 4 +-- 4 files changed, 51 insertions(+), 42 deletions(-) diff --git a/group_vars/all/07_applications.yml b/group_vars/all/07_applications.yml index 6d336eda..40002381 100644 --- a/group_vars/all/07_applications.yml +++ b/group_vars/all/07_applications.yml @@ -235,6 +235,10 @@ defaults_applications: css_enabled: "{{css_enabled_default}}" # Enables\Disables Global CSS Style landingpage_iframe_enabled: "{{landingpage_iframe_enabled_default}}" # Enables\Disables the possibility to embed this on landing page via iframe + ## Libre Office + libreoffice: + flavor: "fresh" # Libre Office flavor, fresh for new, still for stable + ## Listmonk listmonk: users: @@ -314,19 +318,19 @@ defaults_applications: matrix: users: administrator: - username: "{{users.administrator.username}}" # Accountname of the matrix admin - playbook_tags: "setup-all,start" # For the initial update use: install-all,ensure-matrix-users-created,start - role: "compose" # Role to setup Matrix. Valid values: ansible, compose - server_name: "{{primary_domain}}" # Adress for the account names etc. + username: "{{users.administrator.username}}" # Accountname of the matrix admin + playbook_tags: "setup-all,start" # For the initial update use: install-all,ensure-matrix-users-created,start + role: "compose" # Role to setup Matrix. Valid values: ansible, compose + server_name: "{{primary_domain}}" # Adress for the account names etc. synapse: - version: "latest" + version: "latest" element: - version: "latest" - setup: false # Set true in inventory file to execute the setup and initializing procedures + version: "latest" + setup: false # Set true in inventory file to execute the setup and initializing procedures database: - central_storage: True # Activate Central Database Storage + central_storage: True # Activate Central Database Storage oidc: - enabled: False # Deactivated OIDC due to this issue https://github.com/matrix-org/synapse/issues/10492 + enabled: False # Deactivated OIDC due to this issue https://github.com/matrix-org/synapse/issues/10492 matomo_tracking_enabled: "{{matomo_tracking_enabled_default}}" # Enables\Disables Matomo Tracking css_enabled: "{{css_enabled_default}}" # Enables\Disables Global CSS Style landingpage_iframe_enabled: "{{landingpage_iframe_enabled_default}}" # Enables\Disables the possibility to embed this on landing page via iframe diff --git a/roles/pc-libreoffice/README.md b/roles/pc-libreoffice/README.md index 039adae0..8982271a 100644 --- a/roles/pc-libreoffice/README.md +++ b/roles/pc-libreoffice/README.md @@ -1,39 +1,24 @@ -# PC-LibreOffice Role +# LibreOffice for Personal Computers -## Overview -This README is for the `pc-libreoffice` role, part of the `cymais` repository. This role focuses on installing LibreOffice, a powerful and free office suite, along with necessary fonts and language packages. +## Description -## Role Contents -The `main.yml` file under the `pc-libreoffice` role includes tasks for installing LibreOffice and its components: +This role installs LibreOffice on Arch Linux systems using the Pacman package manager. In addition, it installs the Liberation fonts (ttf-liberation) and language packs corresponding to your chosen LibreOffice flavor. LibreOffice is a powerful and free office suite that provides a comprehensive set of tools for document processing, spreadsheets, presentations, and more. -1. **Install LibreOffice**: - - Uses the `community.general.pacman` module to install: - - `ttf-liberation`: A font package that includes Liberation fonts, often used in LibreOffice documents. - - `libreoffice-still`: The stable version of the LibreOffice suite. +Learn more about LibreOffice on the [official website](https://www.libreoffice.org). -2. **Install LibreOffice Language Packages**: - - Installs various language packs for LibreOffice, allowing for multi-language support. The languages to be installed are determined by the `{{libreoffice_languages}}` variable. +## Purpose -## Dependencies -This role depends on: -- **hunspell**: Ensures that Hunspell, a spell checker used by LibreOffice for many languages, is installed. +The purpose of this role is to automate the installation and configuration of LibreOffice along with its language support on personal computers. This ensures that users have a consistent and fully functional office suite environment across their systems. -## Purpose and Usage -The `pc-libreoffice` role is ideal for users who need a comprehensive, free office suite for personal or professional use. It's particularly useful for setting up a new system or ensuring that all necessary office software is present and properly configured. +## Features -## Prerequisites -- **Ansible**: Must be installed to use this role. -- **Arch Linux-based System**: The role uses the `pacman` package manager, making it suitable for Arch Linux or similar distributions. +- **Automated Installation:** Installs LibreOffice along with Liberation fonts and additional language packages using Pacman. +- **Customizable Flavor:** Supports installation of different LibreOffice flavors by dynamically setting the package name. +- **Language Support:** Iterates through a list of desired language packages to ensure comprehensive localization. +- **Seamless Integration:** Designed to work within a larger system setup environment, integrating with dependencies such as Hunspell for spell checking. -## Running the Role -To use this role: -1. Clone the `cymais` repository. -2. Navigate to the `roles/pc-libreoffice` directory. -3. Define the `libreoffice_languages` variable with the desired language codes. -4. Run the role using Ansible, ensuring you have the necessary permissions for software installation. +## Credits -## Customization -You can customize this role by adjusting the `libreoffice_languages` variable to include the language packs you need, or by adding additional LibreOffice-related packages as required. - -## Support and Contributions -For support, feedback, or contributions, such as adding more functionality or enhancing the existing setup, please open an issue or submit a pull request in the `cymais` repository. Contributions that improve the LibreOffice setup and user experience are highly welcomed. \ No newline at end of file +Developed and maintained by **Kevin Veen-Birkenbach**. +Learn more at [www.veen.world](https://www.veen.world) +License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl) diff --git a/roles/pc-libreoffice/meta/main.yml b/roles/pc-libreoffice/meta/main.yml index a17ee3d0..98424d8a 100644 --- a/roles/pc-libreoffice/meta/main.yml +++ b/roles/pc-libreoffice/meta/main.yml @@ -1,2 +1,22 @@ +--- +galaxy_info: + author: "Kevin Veen-Birkenbach" + description: "Installs LibreOffice along with Liberation fonts and language packages on Arch Linux systems for a complete office suite experience." + license: "CyMaIS NonCommercial License (CNCL)" + license_url: "https://s.veen.world/cncl" + company: | + Kevin Veen-Birkenbach + Consulting & Coaching Solutions + https://www.veen.world + min_ansible_version: "2.9" + platforms: + - name: Archlinux + versions: + - rolling + galaxy_tags: + - libreoffice + - office-suite + - archlinux + - automation dependencies: -- hunspell + - hunspell \ No newline at end of file diff --git a/roles/pc-libreoffice/tasks/main.yml b/roles/pc-libreoffice/tasks/main.yml index 5a7d15a7..fa36a18f 100644 --- a/roles/pc-libreoffice/tasks/main.yml +++ b/roles/pc-libreoffice/tasks/main.yml @@ -2,11 +2,11 @@ community.general.pacman: name: - ttf-liberation - - libreoffice-fresh + - "libreoffice-{{ applications.libreoffice.flavor }}" state: present - name: install libreoffice language packages community.general.pacman: - name: "libreoffice-fresh-{{ item }}" + name: "libreoffice-{{ applications.libreoffice.flavor }}-{{ item }}" state: present loop: "{{libreoffice_languages}}"