TOOCS.elixir
TOOCS / Ansible Role: TOOCS.elixir
/!\ This role has a new name - Old name:
FlorianKempenich.erlang-elixir-phoenix
/!\
This role installs Erlang, Elixir, and the Phoenix Framework on Ubuntu/Debian and Mac OS X.
What is TOOCS?
TOOCS stands for The Opinionated One-Click Setups. These are tools/ansible roles that help set up a system quickly and easily. You can use them directly or check the code as a step-by-step learning guide.
They are called "opinionated" because they will set up the tool in one click, but the way they do it can change, especially with new versions. Always read the code to understand what’s happening!
Requirements
This role works only on Mac OS X & Ubuntu/Debian.
Role Variables
erlang_versions
- This is a list of Erlang versions to install using
asdf
. - The first version in the list will be set as
global
(default). - This is only used if you choose the
asdf
installation method; if you choose thenative
method, it will install the latest version. - For more details on which version to use, visit TOOCS.asdf - Supported Languages.
- Default:
[20.3.8.9]
- This is a list of Erlang versions to install using
elixir_versions
- A list of Elixir versions to install using
asdf
. - The first version will be the
global
version (default). Elixir
requiresErlang
to be installed first.- Only used for
asdf
, thenative
method installs the latest version. - Check TOOCS.asdf - Supported Languages for version details.
- Default:
[1.7.4]
- A list of Elixir versions to install using
installation_method
- Options:
asdf
,native
. - For details, see Installation Methods.
- Default:
asdf
- Options:
asdf_skip_shell_setup
- This option allows you to skip shell setup when installing
asdf
. - See Installation Methods.
- Default:
false
- This option allows you to skip shell setup when installing
erlang_repo_package
- This specifies the Erlang package to use for the
native
installation method. - Default:
erlang-solutions_1.0_all.deb
- This specifies the Erlang package to use for the
Installation Methods
asdf
This is the preferred and default method using the
asdf
version manager.The setup and configuration of
asdf
, along with the installation of Erlang and Elixir, relies on another TOOCS role: TOOCS.asdf.Note: Since Erlang and Elixir are compiled from source, the setup might take some time.
After installation - Setting up your shell with
asdf
Using
zsh
? Good news! Your shell is automatically set up duringasdf
installation.Not using
zsh
? You'll need to do some manual setup, see: TOOCS/asdf - Nonzsh
Users.If
asdf
is already set up on your machine, you can skip the automatic shell setup by setting the variableasdf_skip_shell_setup
totrue
.
native
This method uses the
apt
orhomebrew
package managers to install Erlang and Elixir as native packages.
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 at: Florian Kempenich
Install Erlang, Elixir, and the Phoenix Framework on Ubuntu/Debian and OSX.
ansible-galaxy install TOOCS.elixir