This role manages the configuration of bash-related files, including .bashrc, .bash_profile, and .bash_aliases.
Find a file
2025-10-16 23:21:07 +02:00
defaults Standardize YAML file formatting 2025-06-06 16:22:46 +02:00
meta add namespace 2025-06-21 11:31:39 +02:00
tasks some linting fixes 2025-10-16 23:21:07 +02:00
templates Initial commit 2025-06-02 22:07:08 +02:00
.gitignore add namespace 2025-06-21 11:31:39 +02:00
LICENSE Initial commit 2025-06-02 22:07:08 +02:00
README.md Initial commit 2025-06-02 22:07:08 +02:00

bashrc_management Role

This role manages the configuration of bash-related files, including .bashrc, .bash_profile, and .bash_aliases. It ensures that existing configurations are backed up and replaced with customized templates.

Description

The bashrc_management role provides a way to configure and manage bash environment files for users. It backs up the existing .bashrc file and deploys customized templates for .bashrc, .bash_profile, and .bash_aliases. These templates include environment variables, aliases, functions, and other useful configurations to enhance the shell experience.

Installation

  1. Ensure that Ansible is installed on your system. The recommended version is at least 2.17.
  2. Clone this repository or add the role to your existing project.
  3. No additional dependencies are required.

Usage

Example Playbook

- name: Configure Bash Environment
  hosts: all
  tasks:
    - name: Update bashrc
      ansible.builtin.include_role:
        name: bashrc_management

Advanced Configuration

You can customize the role further by modifying the templates (bashrc.j2, bash_profile.j2, bash_aliases.j2) to include additional environment variables, aliases, or functions.

Features

  • Backup Existing Configuration: Backs up the existing .bashrc file to .bashrc_bak to prevent data loss.
  • Template-Based Configuration: Deploys customized templates for .bashrc, .bash_profile, and .bash_aliases.
  • Customizable Permissions: Allows you to set specific file permissions for the copied files.
  • Enhanced Shell Experience: Includes useful aliases, functions, and environment variables in the templates.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Submit a pull request describing your changes.

License

This project is licensed under the AGPL License. The AGPL license requires that modifications to the software be disclosed when distributed or made available over a network. For more information, see the LICENSE file.