ansible-role--bash/README.md

65 lines
2 KiB
Markdown
Raw Normal View History

2024-07-12 13:13:45 +00:00
# Ansible Role: bash
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
This role installs a customized Bash environment on your remote servers. It includes configuration files, aliases, and scripts to enhance your command-line experience.
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
## Requirements
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
This role was tested on Debian-based systems, and may require adaptations for other Linux distributions.
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
## Role Variables
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
The following variables can be customized when using this role:
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
### `bash_users`
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
This variable defines a list of users for whom the Bash environment will be installed and configured. By default, the list is empty.
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
**Default Value:** `[]`
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
**Example:**
```yaml
bash_users:
- alice
- bob
```
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
This would install the customized Bash environment for users `alice` and `bob`.
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
## Dependencies
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
This role has no dependencies on other Ansible Galaxy roles.
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
## Example Playbook
2024-07-12 12:12:40 +00:00
2024-07-12 13:13:45 +00:00
This example playbook demonstrates how to use the `glenux.bash` role.
```yaml
- 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.