mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-06-25 11:45:32 +02:00
Compare commits
11 Commits
c628c1edcd
...
500f8b508d
Author | SHA1 | Date | |
---|---|---|---|
500f8b508d | |||
5dda19cdc5 | |||
a2955a34ab | |||
00c663a694 | |||
d1de427653 | |||
6cbbd4b84b | |||
b4ea171908 | |||
2629603012 | |||
9dc571062c | |||
83007983a5 | |||
98b7b15548 |
@ -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:
|
||||
|
@ -3,5 +3,6 @@
|
||||
{% for plugin in applications[application_id].plugins -%}
|
||||
"{{ plugin }}"{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
],
|
||||
"PasswordManagerEnabled": false
|
||||
}
|
@ -1,2 +1,5 @@
|
||||
---
|
||||
|
||||
application_id: "chromium"
|
||||
|
||||
chromium_package: "{{ 'chromium-browser' if ansible_os_family == 'Debian' else 'chromium' }}"
|
@ -6,7 +6,8 @@
|
||||
"{{ plugin }}"{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
},
|
||||
"DisablePasswordManager": true
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
---
|
||||
# Default variables for the pc-firefox role
|
||||
|
||||
application_id: "firefox"
|
||||
|
||||
# Package name for Firefox on Arch Linux
|
||||
firefox_package: firefox
|
||||
|
@ -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.
|
||||
|
||||
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
|
||||
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:
|
||||
1. Clone the `cymais` repository.
|
||||
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
|
||||
This role can be customized to include additional Arduino-related packages or tools, depending on the user's requirements.
|
||||
|
@ -5,7 +5,7 @@
|
||||
- arduino-docs
|
||||
state: present
|
||||
|
||||
- name: Adding user {{client_username}} to relevant arduino usergroups
|
||||
user: name={{client_username}}
|
||||
- name: Adding user {{users.client.username}} to relevant arduino usergroups
|
||||
user: name={{users.client.username}}
|
||||
groups=uucp lock
|
||||
append=yes
|
||||
|
@ -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.
|
||||
|
||||
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
|
||||
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
|
||||
- **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.
|
||||
|
||||
## Support & Contribution
|
||||
|
@ -5,8 +5,8 @@
|
||||
- docker-compose
|
||||
state: present
|
||||
|
||||
- name: Adding user {{client_username}} to relevant docker usergroup
|
||||
- name: Adding user {{users.client.username}} to relevant docker usergroup
|
||||
user:
|
||||
name: "{{client_username}}"
|
||||
name: "{{users.client.username}}"
|
||||
groups: docker
|
||||
append: yes
|
||||
|
@ -1,13 +1,24 @@
|
||||
# PC-Git Role
|
||||
# Git for Personal Computers
|
||||
|
||||
## Overview
|
||||
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.
|
||||
## Description
|
||||
|
||||
## Purpose and Usage
|
||||
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.
|
||||
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.
|
||||
|
||||
## Customization
|
||||
You can customize this role by modifying the variables for user email and name or by adding additional Git configuration tasks as needed.
|
||||
## Purpose
|
||||
|
||||
## Support and Contributions
|
||||
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.
|
||||
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.
|
||||
|
||||
## 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)
|
||||
|
22
roles/pc-git/meta/main.yml
Normal file
22
roles/pc-git/meta/main.yml
Normal 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
|
@ -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
|
||||
community.general.pacman:
|
||||
name: git
|
||||
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
|
@ -1 +1 @@
|
||||
auto_start_directory: "/home/{{client_username}}/.config/autostart/"
|
||||
auto_start_directory: "/home/{{users.client.username}}/.config/autostart/"
|
@ -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.
|
||||
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)
|
||||
|
@ -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
|
@ -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}}"
|
||||
|
6
roles/pc-lid-switch/handlers/main.yml
Normal file
6
roles/pc-lid-switch/handlers/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Restart systemd-logind
|
||||
become: yes
|
||||
systemd:
|
||||
name: systemd-logind
|
||||
state: restarted
|
9
roles/pc-lid-switch/tasks/main.yml
Normal file
9
roles/pc-lid-switch/tasks/main.yml
Normal 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
|
@ -5,8 +5,8 @@ This README details the `pc-nextcloud` role, part of the `cymais` repository. Th
|
||||
|
||||
## Role Variables
|
||||
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}}/`.
|
||||
- `cloud_directory`: The directory path for Nextcloud cloud storage, structured as `{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{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}}/{{users.client.username}}/`.
|
||||
|
||||
## Role 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:
|
||||
1. Clone the `cymais` repository.
|
||||
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.
|
||||
|
||||
## Customization
|
||||
|
@ -7,8 +7,8 @@
|
||||
ansible.builtin.file:
|
||||
src: "{{cloud_directory}}{{item}}"
|
||||
dest: "{{user_home_directory}}{{item}}"
|
||||
owner: "{{client_username}}"
|
||||
group: "{{client_username}}"
|
||||
owner: "{{users.client.username}}"
|
||||
group: "{{users.client.username}}"
|
||||
state: link
|
||||
loop:
|
||||
- Templates
|
||||
@ -27,6 +27,6 @@
|
||||
ansible.builtin.file:
|
||||
src: "{{cloud_directory}}InstantUpload"
|
||||
dest: "{{user_home_directory}}Dump"
|
||||
owner: "{{client_username}}"
|
||||
group: "{{client_username}}"
|
||||
owner: "{{users.client.username}}"
|
||||
group: "{{users.client.username}}"
|
||||
state: link
|
@ -1,2 +1,2 @@
|
||||
user_home_directory: "/home/{{client_username}}/"
|
||||
cloud_directory: "{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{client_username}}/"
|
||||
user_home_directory: "/home/{{users.client.username}}/" # Home directory of the user
|
||||
cloud_directory: "{{user_home_directory}}Clouds/{{cloud_fqdn}}/{{users.client.username}}/" # Folder which contains the cloud data
|
||||
|
@ -1,6 +1,6 @@
|
||||
- name: install swap-forge
|
||||
command:
|
||||
cmd: "pkgmgr install backup-docker-to-local --clone-mode https"
|
||||
cmd: "pkgmgr install swap-forge --clone-mode https"
|
||||
become: true
|
||||
|
||||
- name: Execute create swapfile script
|
||||
|
@ -9,7 +9,7 @@
|
||||
- driver-non-free
|
||||
|
||||
- name: pc-office
|
||||
when: ("collection_officetools
|
||||
when: ("collection_officetools" in group_names)
|
||||
include_role:
|
||||
name: "{{ item }}"
|
||||
loop:
|
||||
@ -54,7 +54,6 @@
|
||||
|
||||
- name: setup ssh client
|
||||
when: ("ssh" in group_names)
|
||||
become: false
|
||||
include_role:
|
||||
name: pc-ssh
|
||||
|
Loading…
x
Reference in New Issue
Block a user