pkg_mgr-asdf

Example:

# Create user 'freckles' if it does not exist, then install 'asdf' for it.
- pkg_mgr-asdf:
    user: freckles

Description

Installs the asdf versions/package manager.

Optionally, you can also install plugins at the same time.

This installs a global profile file into /etc/profile.d/asdf.sh. After installation of asdf you either need to logout and login again to have asdf available, or execute either source /etc/profile.d/asdf.sh or source ~/.asdf/asdf.sh.

Once asdf is available, you can install plugins by executing asdf pulgin-add [plugin-name], a list of available plugins can be found here.

Having a plugin installed doesn't mean the language/pkg itself is installed, for that you need to pick a version. To list all available versions for a plugin, issue: asdf list-all [plugin], for example: asdf list-all ruby. Then install via asdf install [package] [version], e.g. asdf install ruby 2.5.3. Then you need to set that version to be global (or local, if that better fits your need): asdf global ruby 2.5.3.

Resources

Variables

Name Type Default Description

plugins

list []

A list of plugins and details about them.

user

string {{ ansible_env.USER }}

The name of the user (optional).

Examples

Example 1

Create user 'freckles' if it does not exist, then install 'asdf' for it.

Code
- pkg_mgr-asdf:
    user: freckles

Command-line

frecklecute pkg_mgr-asdf --help

Usage: frecklecute pkg_mgr-asdf [OPTIONS]

  Installs the [asdf](https://github.com/asdf-vm/asdf) versions/package
  manager.

  Optionally, you can also install plugins at the same time.

  This installs a global profile file into /etc/profile.d/asdf.sh. After
  installation of asdf you either need to logout and login again to have
  ``asdf`` available, or execute either ``source /etc/profile.d/asdf.sh`` or
  ``source ~/.asdf/asdf.sh``.

  Once *asdf* is available, you can install plugins by executing ``asdf
  pulgin-add [plugin-name]``, a list of available plugins can be found
  [here](https://github.com/asdf-vm/asdf-plugins).

  Having a plugin installed doesn't mean the language/pkg itself is
  installed, for that you need to pick a version. To list all available
  versions for a plugin, issue: ``asdf list-all [plugin]``, for example:
  ``asdf list-all ruby``. Then install via ``asdf install [package]
  [version]``, e.g. ``asdf install ruby 2.5.3``. Then you need to set that
  version to be global (or local, if that better fits your need): ``asdf
  global ruby 2.5.3``.

Options:
  --user USER  The name of the user (optional).  [default: {{ ansible_env.USER
               }}]
  --help       Show this message and exit.