FlorianKempenich.erlang-elixir-phoenix
TOOCS / Ansible Role: TOOCS.elixir
/!\ This role has a new name - Old name:
FlorianKempenich.erlang-elixir-phoenix
/!\
This role helps you install Erlang, Elixir, and the Phoenix Framework on Ubuntu/Debian and macOS.
What is TOOCS?
TOOCS stands for The Opinionated One-Click Setups. These are simple tools/Ansible roles that let you set up a system with just one click. They're easy and reliable ways to get specific tools installed, and you can use them directly or examine their code for a step-by-step guide.
As the name implies, TOOCS is opinionated: while they promise quick installation, the method may change with new updates, which could cause issues. Make sure to read the code to understand what is going on!
Requirements
This role works only on macOS and Ubuntu/Debian.
Role Variables
erlang_versions
- List of Erlang versions to install using
asdf
. - The first version in the list will be set as
global
(default). - Only used with the
asdf
installation method; thenative
method installs the latest version. - For supported versions, check TOOCS.asdf - Supported Languages.
- Default:
[20.3.8.9]
- List of Erlang versions to install using
elixir_versions
- List of Elixir versions to install using
asdf
. - The first version in the list will also be set as
global
. - Elixir requires Erlang to be installed.
- Only used with the
asdf
installation method; thenative
method installs the latest version. - For supported versions, check TOOCS.asdf - Supported Languages.
- Default:
[1.7.4]
- List of Elixir versions to install using
installation_method
- Valid options:
asdf
,native
. - See Installation Methods.
- Default:
asdf
.
- Valid options:
asdf_skip_shell_setup
- Skip shell setup when installing
asdf
. - See Installation Methods.
- Default:
false
.
- Skip shell setup when installing
erlang_repo_package
- The package used for Erlang when installing with the
native
method. - Default:
erlang-solutions_1.0_all.deb
.
- The package used for Erlang when installing with the
Installation Methods
asdf
This is the preferred and default method, using the
asdf
version manager.The setup of
asdf
and the installation of Erlang and Elixir are handled by another TOOCS role: TOOCS.asdf.Note: Since Erlang and Elixir are compiled from source, the installation steps may take some time.
Post Install - Shell Configuration with
asdf
If you use
zsh
, you're good to go! The shell is set up automatically withasdf
.If you do NOT use
zsh
, you'll need to set it up manually. See: TOOCS/asdf - Nonzsh
Users.If
asdf
is already set up on your machine, you can skip the automatic shell setup by settingasdf_skip_shell_setup
totrue
.
native
This method installs Erlang and Elixir as standard packages using
apt
orhomebrew
.
Example Playbook
- hosts: localhost
tasks:
- include_role:
name: TOOCS.elixir
# OR
- hosts: localhost
tasks:
- include_role:
name: TOOCS.elixir
vars:
erlang_versions:
- 20.3.8.9
- 21.1.4
elixir_versions:
- 1.7.4
- 1.6.6
# OR
- hosts: localhost
tasks:
- include_role:
name: TOOCS.elixir
vars:
installation_method: "native"
License
MIT
Author Information
Learn more about my work: Florian Kempenich
Deprecated - Role was renamed - Use [FlorianKempenich.toocs_elixir](https://github.com/FlorianKempenich/ansible-role-erlang-elixir-phoenix) instead
ansible-galaxy install FlorianKempenich.erlang-elixir-phoenix