Compare commits

...

11 Commits

23 changed files with 155 additions and 79 deletions

View File

@ -235,6 +235,10 @@ defaults_applications:
css_enabled: "{{css_enabled_default}}" # Enables\Disables Global CSS Style 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 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
listmonk: listmonk:
users: users:

View File

@ -3,5 +3,6 @@
{% for plugin in applications[application_id].plugins -%} {% for plugin in applications[application_id].plugins -%}
"{{ plugin }}"{% if not loop.last %},{% endif %} "{{ plugin }}"{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
] ],
"PasswordManagerEnabled": false
} }

View File

@ -1,2 +1,5 @@
--- ---
application_id: "chromium"
chromium_package: "{{ 'chromium-browser' if ansible_os_family == 'Debian' else 'chromium' }}" chromium_package: "{{ 'chromium-browser' if ansible_os_family == 'Debian' else 'chromium' }}"

View File

@ -6,7 +6,8 @@
"{{ plugin }}"{% if not loop.last %},{% endif %} "{{ plugin }}"{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
] ]
} },
"DisablePasswordManager": true
} }
} }

View File

@ -1,6 +1,8 @@
--- ---
# Default variables for the pc-firefox role # Default variables for the pc-firefox role
application_id: "firefox"
# Package name for Firefox on Arch Linux # Package name for Firefox on Arch Linux
firefox_package: firefox firefox_package: firefox

View File

@ -12,7 +12,7 @@ The `main.yml` file in the `pc-developer-tools-arduino` role encompasses tasks c
- `arduino-docs`: Documentation for Arduino, providing essential information for development. - `arduino-docs`: Documentation for Arduino, providing essential information for development.
2. **Adding User to Relevant Arduino Usergroups**: 2. **Adding User to Relevant Arduino Usergroups**:
- This task modifies the user (specified by `{{client_username}}`) to be added to the `uucp` and `lock` groups, which is necessary for accessing serial ports on Linux systems. - This task modifies the user (specified by `{{users.client.username}}`) to be added to the `uucp` and `lock` groups, which is necessary for accessing serial ports on Linux systems.
## Dependencies ## Dependencies
The role depends on: The role depends on:
@ -29,7 +29,7 @@ The `pc-developer-tools-arduino` role is tailored for developers and hobbyists w
To utilize this role: To utilize this role:
1. Clone the `cymais` repository. 1. Clone the `cymais` repository.
2. Navigate to the `roles/pc-developer-tools-arduino` directory. 2. Navigate to the `roles/pc-developer-tools-arduino` directory.
3. Execute the role using Ansible, ensuring you replace `{{client_username}}` with the actual username and have the necessary system permissions. 3. Execute the role using Ansible, ensuring you replace `{{users.client.username}}` with the actual username and have the necessary system permissions.
## Customization ## Customization
This role can be customized to include additional Arduino-related packages or tools, depending on the user's requirements. This role can be customized to include additional Arduino-related packages or tools, depending on the user's requirements.

View File

@ -5,7 +5,7 @@
- arduino-docs - arduino-docs
state: present state: present
- name: Adding user {{client_username}} to relevant arduino usergroups - name: Adding user {{users.client.username}} to relevant arduino usergroups
user: name={{client_username}} user: name={{users.client.username}}
groups=uucp lock groups=uucp lock
append=yes append=yes

View File

@ -8,7 +8,7 @@ The `main.yml` file in the `pc-docker` role consists of two primary tasks:
1. **Install Docker**: This task uses the `community.general.pacman` module to install `docker` and `docker-compose` on the system. It ensures that these packages are present on the PC. 1. **Install Docker**: This task uses the `community.general.pacman` module to install `docker` and `docker-compose` on the system. It ensures that these packages are present on the PC.
2. **User Group Configuration**: This task adds a specified user (denoted as `{{client_username}}`) to the Docker user group. This is crucial for allowing the specified user to interact with Docker without needing superuser permissions. 2. **User Group Configuration**: This task adds a specified user (denoted as `{{users.client.username}}`) to the Docker user group. This is crucial for allowing the specified user to interact with Docker without needing superuser permissions.
## Use Case ## Use Case
The playbook is designed for developers who require Docker in their local development environments. It simplifies the process of Docker installation and configuration, making it straightforward for developers to start containerizing their applications without the complexities often encountered in a server or production environment. The playbook is designed for developers who require Docker in their local development environments. It simplifies the process of Docker installation and configuration, making it straightforward for developers to start containerizing their applications without the complexities often encountered in a server or production environment.
@ -25,7 +25,7 @@ To run this playbook:
## Important Notes ## Important Notes
- **Not for Server Use**: This playbook is not designed for server environments. It is optimized for individual development machines. - **Not for Server Use**: This playbook is not designed for server environments. It is optimized for individual development machines.
- **Customization**: You may need to customize the playbook, especially the `{{client_username}}` variable, to suit your specific setup. - **Customization**: You may need to customize the playbook, especially the `{{users.client.username}}` variable, to suit your specific setup.
- **Security Considerations**: While adding a user to the Docker group provides ease of use, be aware of the security implications. It grants the user elevated privileges which, if misused, can affect the entire system. - **Security Considerations**: While adding a user to the Docker group provides ease of use, be aware of the security implications. It grants the user elevated privileges which, if misused, can affect the entire system.
## Support & Contribution ## Support & Contribution

View File

@ -5,8 +5,8 @@
- docker-compose - docker-compose
state: present state: present
- name: Adding user {{client_username}} to relevant docker usergroup - name: Adding user {{users.client.username}} to relevant docker usergroup
user: user:
name: "{{client_username}}" name: "{{users.client.username}}"
groups: docker groups: docker
append: yes append: yes

View File

@ -1,13 +1,24 @@
# PC-Git Role # Git for Personal Computers
## Overview ## Description
Welcome to the `pc-git` role documentation, part of the `cymais` repository. This role is focused on setting up Git, a widely-used version control system, on personal computers. The role includes tasks for installing Git and configuring global user details.
## Purpose and Usage This role installs and configures Git on the target system using the Pacman package manager (via the community.general.pacman module). In addition, it configures Git for the user by installing a custom git configuration using the [git-configurator](https://github.com/kevinveenbirkenbach/git-configurator) tool. The role ensures that Git is installed and that the configuration tasks are run only once per host.
The `pc-git` role is essential for developers, IT professionals, and anyone who needs to utilize version control for their projects. It automates the installation of Git and the initial configuration of user identity, which is crucial for committing changes and collaborating on projects using Git.
## Customization ## Purpose
You can customize this role by modifying the variables for user email and name or by adding additional Git configuration tasks as needed.
## Support and Contributions The purpose of this role is to automate the installation and configuration of Git for personal computers. By leveraging a custom git-configurator, it sets up essential Git settings such as merge options, rebase preferences, user information, and GPG signing, ensuring a consistent environment for version control operations.
For support, feedback, or contributions to this role, such as adding more Git-related configurations or tools, please open an issue or submit a pull request in the `cymais` repository. Contributions that enhance Git setup and configuration are highly encouraged.
## Features
- **Automated Git Installation:** Installs Git using Pacman.
- **Custom Git Configuration:** Invokes the git-configurator tool to merge user-specific configuration options.
- **Idempotent Task Execution:** Uses host-level run-once artifacts to ensure that configuration tasks are executed only once per host.
- **Integration:** Works alongside the package-manager role to streamline overall system setup.
## Credits
Developed and maintained by **Kevin Veen-Birkenbach**.
Learn more at [www.veen.world](https://www.veen.world)
For Git configuration details, see [git-configurator on GitHub](https://github.com/kevinveenbirkenbach/git-configurator).
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)

View File

@ -0,0 +1,22 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Installs Git and configures it using a custom git-configurator for personal computers."
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:
- git
- configuration
- pacman
- personal-computer
dependencies:
- package-manager

View File

@ -1,8 +1,21 @@
- name: Set git user email to {{user_email}}
ansible.builtin.shell: git config --global user.email "{{user_email}}"
- name: Set git user name to {{user_full_name}}
ansible.builtin.shell: git config --global user.name "{{user_full_name}}"
- name: install git - name: install git
community.general.pacman: community.general.pacman:
name: git name: git
state: present state: present
become: true
- name: install gitconfig
command:
cmd: "pkgmgr install gitconfig --clone-mode https"
when: run_once_gitconfig is not defined
become: true
- name: setup git
command: gitconfig --merge-option rebase --name "{{users.client.full_name}}" --email "{{users.client.email}}" --website "{{users.client.website}}" --signing gpg --gpg-key "{{users.client.gpg}}"
when: run_once_gitconfig is not defined
become: false
- name: run the gitconfig tasks once
set_fact:
run_once_gitconfig: true
when: run_once_gitconfig is not defined

View File

@ -1 +1 @@
auto_start_directory: "/home/{{client_username}}/.config/autostart/" auto_start_directory: "/home/{{users.client.username}}/.config/autostart/"

View File

@ -1,39 +1,24 @@
# PC-LibreOffice Role # LibreOffice for Personal Computers
## Overview ## Description
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.
## Role Contents 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.
The `main.yml` file under the `pc-libreoffice` role includes tasks for installing LibreOffice and its components:
1. **Install LibreOffice**: Learn more about LibreOffice on the [official website](https://www.libreoffice.org).
- 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.
2. **Install LibreOffice Language Packages**: ## Purpose
- Installs various language packs for LibreOffice, allowing for multi-language support. The languages to be installed are determined by the `{{libreoffice_languages}}` variable.
## Dependencies 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.
This role depends on:
- **hunspell**: Ensures that Hunspell, a spell checker used by LibreOffice for many languages, is installed.
## Purpose and Usage ## Features
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.
## Prerequisites - **Automated Installation:** Installs LibreOffice along with Liberation fonts and additional language packages using Pacman.
- **Ansible**: Must be installed to use this role. - **Customizable Flavor:** Supports installation of different LibreOffice flavors by dynamically setting the package name.
- **Arch Linux-based System**: The role uses the `pacman` package manager, making it suitable for Arch Linux or similar distributions. - **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 ## Credits
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.
## Customization Developed and maintained by **Kevin Veen-Birkenbach**.
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. Learn more at [www.veen.world](https://www.veen.world)
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
## 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.

View File

@ -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: dependencies:
- hunspell - hunspell

View File

@ -2,11 +2,11 @@
community.general.pacman: community.general.pacman:
name: name:
- ttf-liberation - ttf-liberation
- libreoffice-fresh - "libreoffice-{{ applications.libreoffice.flavor }}"
state: present state: present
- name: install libreoffice language packages - name: install libreoffice language packages
community.general.pacman: community.general.pacman:
name: "libreoffice-fresh-{{ item }}" name: "libreoffice-{{ applications.libreoffice.flavor }}-{{ item }}"
state: present state: present
loop: "{{libreoffice_languages}}" loop: "{{libreoffice_languages}}"

View File

@ -0,0 +1,6 @@
---
- name: Restart systemd-logind
become: yes
systemd:
name: systemd-logind
state: restarted

View File

@ -0,0 +1,9 @@
---
- name: Set HandleLidSwitch to hibernate in /etc/systemd/logind.conf
become: yes
lineinfile:
path: /etc/systemd/logind.conf
regexp: '^#?HandleLidSwitch='
line: 'HandleLidSwitch=hibernate'
backup: yes
notify: Restart systemd-logind

View File

@ -5,8 +5,8 @@ This README details the `pc-nextcloud` role, part of the `cymais` repository. Th
## Role Variables ## Role Variables
The `vars/main.yml` file defines key variables used in this role: The `vars/main.yml` file defines key variables used in this role:
- `user_home_directory`: The home directory of the user, typically `/home/{{client_username}}/`. - `user_home_directory`: The home directory of the user, typically `/home/{{users.client.username}}/`.
- `cloud_directory`: The directory path for Nextcloud cloud storage, structured as `{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{client_username}}/`. - `cloud_directory`: The directory path for Nextcloud cloud storage, structured as `{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{users.client.username}}/`.
## Role Tasks ## Role Tasks
The `main.yml` file in the `pc-nextcloud` role comprises the following tasks: The `main.yml` file in the `pc-nextcloud` role comprises the following tasks:
@ -31,7 +31,7 @@ The `pc-nextcloud` role is designed for users who want to integrate Nextcloud, a
To use this role: To use this role:
1. Clone the `cymais` repository. 1. Clone the `cymais` repository.
2. Navigate to the `roles/pc-nextcloud` directory. 2. Navigate to the `roles/pc-nextcloud` directory.
3. Ensure that the `client_username` and `cloud_fqdn` variables are correctly set to match your Nextcloud account details. 3. Ensure that the `users.client.username` and `cloud_fqdn` variables are correctly set to match your Nextcloud account details.
4. Execute the role using Ansible, ensuring appropriate permissions are available for installations and configurations. 4. Execute the role using Ansible, ensuring appropriate permissions are available for installations and configurations.
## Customization ## Customization

View File

@ -7,8 +7,8 @@
ansible.builtin.file: ansible.builtin.file:
src: "{{cloud_directory}}{{item}}" src: "{{cloud_directory}}{{item}}"
dest: "{{user_home_directory}}{{item}}" dest: "{{user_home_directory}}{{item}}"
owner: "{{client_username}}" owner: "{{users.client.username}}"
group: "{{client_username}}" group: "{{users.client.username}}"
state: link state: link
loop: loop:
- Templates - Templates
@ -27,6 +27,6 @@
ansible.builtin.file: ansible.builtin.file:
src: "{{cloud_directory}}InstantUpload" src: "{{cloud_directory}}InstantUpload"
dest: "{{user_home_directory}}Dump" dest: "{{user_home_directory}}Dump"
owner: "{{client_username}}" owner: "{{users.client.username}}"
group: "{{client_username}}" group: "{{users.client.username}}"
state: link state: link

View File

@ -1,2 +1,2 @@
user_home_directory: "/home/{{client_username}}/" user_home_directory: "/home/{{users.client.username}}/" # Home directory of the user
cloud_directory: "{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{client_username}}/" cloud_directory: "{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{users.client.username}}/" # Folder which contains the cloud data

View File

@ -1,6 +1,6 @@
- name: install swap-forge - name: install swap-forge
command: command:
cmd: "pkgmgr install backup-docker-to-local --clone-mode https" cmd: "pkgmgr install swap-forge --clone-mode https"
become: true become: true
- name: Execute create swapfile script - name: Execute create swapfile script

View File

@ -9,7 +9,7 @@
- driver-non-free - driver-non-free
- name: pc-office - name: pc-office
when: ("collection_officetools when: ("collection_officetools" in group_names)
include_role: include_role:
name: "{{ item }}" name: "{{ item }}"
loop: loop:
@ -54,7 +54,6 @@
- name: setup ssh client - name: setup ssh client
when: ("ssh" in group_names) when: ("ssh" in group_names)
become: false
include_role: include_role:
name: pc-ssh name: pc-ssh