From 8a5997e54e4869bcf6323ce121b2d7d2b875535a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 14 Mar 2025 12:37:15 +0100 Subject: [PATCH] Optimized .mds and meta/main.yml for user. --- roles/user/README.md | 25 ++++++++++++++++++++++++- roles/user/meta/main.yml | 25 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 roles/user/meta/main.yml diff --git a/roles/user/README.md b/roles/user/README.md index bdc1def6..fd6b7a42 100644 --- a/roles/user/README.md +++ b/roles/user/README.md @@ -1 +1,24 @@ -This role executes tasks which are relevant for all users \ No newline at end of file +# User Role + +## Description + +This role executes tasks that are relevant for all users by configuring essential shell files. It deploys customized templates for [`.bashrc`](https://wiki.archlinux.org/title/Bash#Startup_files) and [`.bash_profile`](https://wiki.archlinux.org/title/Bash#Login_shells) for any specified user. This ensures a consistent and enhanced shell environment across the system. + +## Overview + +Optimized for modular configuration, this role uses Jinja2 templates to create: +- A customized [`.bashrc`](https://wiki.archlinux.org/title/Bash#Startup_files) that sets up a dynamic welcome message, system information, and useful aliases. +- A standardized [`.bash_profile`](https://wiki.archlinux.org/title/Bash#Login_shells) that sources the `.bashrc` to ensure consistent behavior upon login. + +The role adapts its file paths based on the target user (e.g. the [root user](https://en.wikipedia.org/wiki/Superuser) or a standard user), ensuring proper ownership and permissions. + +## Purpose + +The primary purpose of this role is to establish a consistent and informative shell environment for all users. By standardizing shell configuration, it helps improve usability and system management through clear and structured output upon login. + +## Features + +- **Shell Configuration:** Deploys customized [`.bashrc`](https://wiki.archlinux.org/title/Bash#Startup_files) and [`.bash_profile`](https://wiki.archlinux.org/title/Bash#Login_shells) files. +- **Dynamic Content:** Displays system information, load averages, memory usage, disk usage, CPU details, and top processes upon login. +- **User-Specific Customization:** Adapts file locations and ownership based on the target user. +- **Enhanced Usability:** Sets color-coded prompts and aliases for a better command-line experience. diff --git a/roles/user/meta/main.yml b/roles/user/meta/main.yml new file mode 100644 index 00000000..feb5a9cc --- /dev/null +++ b/roles/user/meta/main.yml @@ -0,0 +1,25 @@ +--- +galaxy_info: + author: "Kevin Veen-Birkenbach" + description: "Executes common tasks for user environment configuration." + 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: Linux + versions: + - all + galaxy_tags: + - user + - bash + - ssh + - configuration + - administration + repository: "https://s.veen.world/cymais" + issue_tracker_url: "https://s.veen.world/cymaisissues" + documentation: "https://s.veen.world/cymais" +dependencies: []