Ansible role to install Homebrew on Linux.
Run tests with a supported Docker image, for example with 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 |
If you want to add a new distribution or release version, please create a
Docker image for it under the tests/ directory and make sure the existing
tests work.
I'm developing this role currently in a black box using the Docker images included in the repository and not running it on live environments.
By default, the role uses Ansible to clone the Homebrew Git repository and create all relevant directories.
To use the official Homebrew installer script instead, you need to enable this in the Ansible configuration:
linuxbrew_use_installer: trueThe installer seems to be faster than the default Ansible installation method.
Set linuxbrew_init_shell to false if you're for example managing your shell
init files using your own .dotfiles repository.
# Configure shell rc files
linuxbrew_init_shell: trueInstall pre-commit hooks and validate coding style:
make lintRun tests in Ubuntu and Debian using Docker:
make testI'm not actively using or maintaining this role, but welcome bug fixes and support for missing operating systems.
The installation is based on the official Homebrew installer script.