2 KiB
Ansible Role: bash
This role installs a customized Bash environment on your remote servers. It includes configuration files, aliases, and scripts to enhance your command-line experience.
Requirements
This role was tested on Debian-based systems, and may require adaptations for other Linux distributions.
Role Variables
The following variables can be customized when using this role:
bash_users
This variable defines a list of users for whom the Bash environment will be installed and configured. By default, the list is empty.
Default Value: []
Example:
bash_users:
- alice
- bob
This would install the customized Bash environment for users alice
and bob
.
Dependencies
This role has no dependencies on other Ansible Galaxy roles.
Example Playbook
This example playbook demonstrates how to use the glenux.bash
role.
- hosts: servers
become: true
roles:
- role: glenux.bash
vars:
bash_users:
- user1
- user2
This playbook will install the custom Bash environment on all servers in the servers
group for users user1
and user2
.
Details
Here is a brief overview of the role's structure:
- Configuration Files: The role installs customized Bash configuration files like
.bashrc
,.bash_profile
and.bash_aliases
to the home directories of specified users. - bashrc.d Directory: A
.bashrc.d
directory is created to store modular Bash scripts that are sourced by the main.bashrc
file. This allows for organized customization and separation of concerns. - Aliases: A set of useful aliases for common commands is included in the
.bash_aliases
file. - Development Environments: Support for various development environments such as Android, Go, and Ruby is included through scripts within the
.bashrc.d
directory. You can adjust these scripts or add new ones based on your specific needs.
License
GPLv2
Author Information
This role was created by [Your Name] You can reach out for any questions or feedback.