.bashrc, .bash_profile, and .bash_aliases.
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
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
- Ensure that Ansible is installed on your system. The recommended version is at least
2.17. - Clone this repository or add the role to your existing project.
- 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
.bashrcfile to.bashrc_bakto 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:
- Fork the repository.
- Create a new branch for your changes.
- 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.