markosamuli.linuxbrew
ansible-linuxbrew
Ansible role to install Homebrew on Linux.
Compatibility
You can test with a supported Docker image, for example using bionic
:
make bionic
Release | Docker image | Ansible |
---|---|---|
Debian 10 | debian-buster |
<2.12,>=2.9.22 |
Debian 11 | debian-bullseye |
>=2.9.22 |
Fedora 37 | fedora-37 |
>=2.9.22 |
Ubuntu 18.04 LTS | ubuntu-bionic |
<2.12,>=2.9.22 |
Ubuntu 20.04 LTS | ubuntu-focal |
>=2.9.22 |
Ubuntu 22.04 LTS | ubuntu-jammy |
>=2.9.22 |
To add a new distribution or version, create a Docker image in the tests/
folder and ensure existing tests pass.
Currently, I am developing this role in isolation using Docker images in the repository and not in live environments.
Configuration
By default, the role uses Ansible to download the Homebrew Git repository and set up the necessary directories.
If you want to use the official Homebrew installer script instead, you need to change this in the Ansible configuration:
linuxbrew_use_installer: true
This installer is usually faster than the default Ansible method.
Role Variables
You can set linuxbrew_init_shell
to false
if you manage your shell settings with your own .dotfiles
.
# Configure shell rc files
linuxbrew_init_shell: true
Coding Style
To check coding style, install pre-commit hooks and run:
make lint
Run Tests
To run tests on Ubuntu and Debian using Docker:
make test
License
Contributing
I'm not actively managing this role, but I welcome bug fixes and support for additional operating systems.
Contributions
The installation process is based on the official Homebrew installer script.